Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google map is blank on screenshots #407

Closed
ch-vadim-maximov opened this issue Dec 15, 2016 · 2 comments
Closed

Google map is blank on screenshots #407

ch-vadim-maximov opened this issue Dec 15, 2016 · 2 comments

Comments

@ch-vadim-maximov
Copy link

Hello,
For some reason map is not captured by the screenshots.
mapnotvisible
Is there a setting I'm missing or this is a limitation of the screenshot library?

Thanks!

@JakeWharton
Copy link
Collaborator

Google Maps is a hole punched through your application and rendered in GL. This will be solved with #4. For now use Falcon's spoon-compat library to capture screenshots: https://github.com/jraska/Falcon

@dthommes
Copy link

dthommes commented Jan 13, 2017

Just to let you know: Falcon does not solve the problem with Google maps. It probably cannot handle OpenGL as well. A good workaround is to use UiAutomator 2.0 from Google. For me it worked in a test on Nexus 6 and Galaxy S5:

UiAutomator Installation Instructions
https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html

Integration with Spoon
(The same way as Falcon does it)

File screenshot = Spoon.screenshot(activity, "map");
UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()).takeScreenshot
                (screenshot);

Happy shooting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants