Hello,
I’m trying to take a screenshot on an Android emulator.
Selenium implementation is written in Java on a Windows host machine. Appium is running on iMac OS X Yosemite.
I have no problems taking screenshots on any of the Apple emulators or Windows based browsers but when I try to run the same code on the Android emulator, the app “hangs” and does not seem to be responding after that.
OS X Yosemite 10.10.4
Appium version: tried on both 1.4.0 and 1.4.8 (same result)
Android studio version: 1.2.2 build 141
Android emulator: Nexus 5 API 22, Lollipop x86
Emulated Performance: Use Host GPU checked
JDK installed: 1.7
Screenshot function is using Selenium’s TakesScreenshot(driver) implementation.
Appium Logs right after calling take screenshot method on android emulator:
info: JSONWP Proxy: Got response with status 200: {“sessionId”:“00034c23b73df62f4f554251ef00b5df”,“status”:0,“value”:null}
info: JSONWP Proxy: Replacing sessionId 00034c23b73df62f4f554251ef00b5df with 00034c23b73df62f4f554251ef00b5df
info: <-- POST /wd/hub/session/00034c23b73df62f4f554251ef00b5df/element/0.5411949658300728-1/submit 200 197.952 ms - 72
info: --> GET /wd/hub/session/00034c23b73df62f4f554251ef00b5df/screenshot {}
info: JSONWP Proxy: Proxying [GET /wd/hub/session/00034c23b73df62f4f554251ef00b5df/screenshot] to [GET http://127.0.0.1:9515/wd/hub/session/00034c23b73df62f4f554251ef00b5df/screenshot] with body: {}
After that there is no more activity and I have to manually kill the app.
Any help would be appreciated. Thanks in advance.
Darek Z
Edit:
Forgot to mention that the Android emulator starts and is responding to normal selenium commands like click a button or type text. App hangs when it hits takescreenshot portion of the code.