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

is there any way to save snapshot on device? #332

Open
jrafaaael opened this issue Nov 3, 2024 · 1 comment
Open

is there any way to save snapshot on device? #332

jrafaaael opened this issue Nov 3, 2024 · 1 comment

Comments

@jrafaaael
Copy link
Contributor

title
I'm trying to take a screenshot and save it on device. I've tried client.device.takeSnapshot(reconnect=True).save("name.png") but it store the screenshot on desktop. I've read docs and look for similar question buy I haven't found something useful so far

@dtmilano
Copy link
Owner

dtmilano commented Nov 5, 2024

Hey @jrafaaael , what's the use case?
AndroidViewClient reads the framebuffer directly, so there's no file created.
However,
CulebraTester2-public creates a temp file to store the image and it's deleted after returning its content, so commenting out https://github.com/dtmilano/CulebraTester2-public/blob/9906b44aeaae186a3bf6f5707e67a161934d5953/app/src/main/java/com/dtmilano/android/culebratester2/location/UiDevice.kt#L244 leaves the file on the device.

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

2 participants