Appium 请问 appium 采用 java 编写如何进行截屏操作?

ueezoo · October 14, 2014 · Last by 杨秋强 replied at October 14, 2014 · 2103 hits

请问 appium 采用 java 编写如何进行截屏操作?以前论坛里的代码用了一直报错。

共收到 1 条回复 时间 点赞
File screenShotFile= ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenShotFile, new File(currentPath+"\\"+"20"+ new Date().getTime() + "-No contacts.png"));
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up