Use below function to capture screen shot of android application using Appium.
// capturing screenshot
public void captureScreenshot(String fileName) {
try {
FileOutputStream out = new
FileOutputStream( fileName + ".jpg");
out.write(((TakesScreenshot)
driver)
.getScreenshotAs(OutputType.BYTES));
out.close();
} catch (Exception e) { }
}
No comments:
Post a Comment
Leave your comments, queries, suggestion I will try to provide solution