taking screenshot in iOS resulting in image with Black color.

54 views
Skip to first unread message

Naidu A

unread,
Mar 12, 2014, 1:28:01 AM3/12/14
to appium-...@googlegroups.com
Hi,
I am using the below code to do take the screenshots.

WebDriver augmentedDriver = new Augmenter().augment(driver);
                        File scrFile = ((TakesScreenshot)augmentedDriver).getScreenshotAs(OutputType.FILE);
                        FileUtils.copyFile(scrFile, new File(filename), true);

Works perfectlu with Android in windows 8 OS.

But when i try to run the same code in iOS and Mac, it results in a image with black color.
Wondering what could be the issue?

regards,
Naidu A S

Naidu A

unread,
Mar 12, 2014, 1:28:26 AM3/12/14
to appium-...@googlegroups.com
I am using Appium 0.16 dmg

Piyush Dungrani

unread,
Mar 12, 2014, 5:56:26 PM3/12/14
to appium-...@googlegroups.com
Hi Naidu,

I won't comment about code but from settings point of view, possible reasons could be:

1) You are using HostGPU to take screenshot (this settings should be somewhere in iOS Simulator
2) Your .app (or .ipa) file is having a flag which is set to ON (ask someone in your dev team if you have any such thing implemented) - To cross check this try to take screen shot of your app using the Simulator or On physical device
Reply all
Reply to author
Forward
0 new messages