When I am taking screenshot using the below code I am getting blank
screenshots. I tried putting sleep but that too is not working.
Please advice. It's not that I am getting all blank screens, I am
getting few blank screens and few proper screenshots. I dont know what I
am doing wrong. I didn't hear appium has any issues in taking
screenshots.
Help me in figuring out a solution.
Code:
WebDriver driver1 = new Augmenter().augment(AppiumBaseTest.getAndroidDriver());
File file = ((TakesScreenshot) driver1).getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(file, new File(System.getProperty("test.screenshot.dir") + href));
Code:
FileUtils.copyFile(((TakesScreenshot) AppiumBaseTest.getAndroidDriver()).
getScreenshotAs(OutputType.FILE), new File(System.getProperty("test.screenshot.dir") + href));
I tried taking screenshot using appium driver also and that is also
giving me the same issue of blank screenshot. Some are proper and some
are blank.
I have tried giving wait for 7 seconds before each screenshot but of no use.
Thanks,
Rajit