在模拟器上运行测试套件(有20-30个测试用例)运行6-7个测试用例后应用程序崩溃,它的工作当我们在物理device.but上执行时,我们必须使用模拟器,我们使用Android emulator和Genymotion。
发布于 2019-03-07 16:04:13
@lav Sharma,您能在这里再扩展一下吗?
或关闭WebView.setWebContentsDebuggingEnabled(false);
在app的onCreate方法中;
List logs = driver.manage().logs().get("logcat").getAll();
public static void dumpLogs(AppiumDriver driver, String testName) { String logPath = "C:\\automation_capture\\"; log.info("{}: Saving device log...", driver.getSessionId()); List<LogEntry> logEntries = driver.manage().logs().get("logcat").filter(Level.ALL); File logFile = new File(String.format("%s_%s.txt",logPath,testName)); PrintWriter log_file_writer = new PrintWriter(logFile); log_file_writer.println(logEntries ); log_file_writer.flush(); log.info("{}: Saving device log - Done.",driver.getSessionId()); } }
希望这能有所帮助。致以最好的问候,尤金
https://stackoverflow.com/questions/55038154
复制相似问题