Skip to content

Screenshots not displaying with new non-deprecated methods #19

@kamgurgul

Description

@kamgurgul

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions