1

I'm trying to run my Appium code in 'Android Emulator' in 'Headless' (-no-window) mode. And I'm facing the issue that screenshots stop working properly and return empty images. Although they work fine when running Emulator with UI (without the '-no-window' option). I also tried to take a screenshot with 'adb' and that doesn't work either

Repro Rate: 4/5

To reproduce, just run launch Emulator with '-no-window' param:

emulator -avd <emulator_name> -no-window

Then just keep capturing screenshot:

adb exec-out screencap -p > screen.png

You will notice that sometimes it will provide a regular screenshot, but rarely, and usually it will be a blank screenshot.

The same behavior with 'Appium' code:

self.driver.screenshot_as_png

Tried with different functions (with 'Selenium' functions as well), in different 'system-iamges' (Android Emulator API lvl), with different configs and nothing helps yet..

Anyone faced the same problem? Haven't found a suitable solution for this yet. Last but not least, I'm on macOS (13.0.1 (22A400))

Dofamin
  • 31
  • 4

0 Answers0