Skip to content

Screenshots not displaying with new non-deprecated methods #19

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

Open
kamgurgul opened this issue Aug 2, 2023 · 0 comments
Open

Screenshots not displaying with new non-deprecated methods #19

kamgurgul opened this issue Aug 2, 2023 · 0 comments

Comments

@kamgurgul
Copy link

kamgurgul commented Aug 2, 2023

Right now all classes and methods from androidx.test.runner.screenshot are deprecated. Current solution require usage of the new api from androidx.test.espresso.screenshot and saving files with androidx.test.services.storage.TestStorage which resolve some issues with external storage on API 32+:

onView(isRoot())
  .captureToBitmap()
  .writeToTestStorage(screenshotName)

Using this method unfortunately show error on dashboard (probably screenshoot cannot be extracted from the device):
image

Edit

Currently only working solution for Android Q and above is to use ContentProvider for storing screenshots in downloads

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

1 participant