screenshot-tests-for-android
screenshot-tests-for-android copied to clipboard
Tests won't record screenshots on API 29+
I'm trying to run tests on emulator using API 29+ and it won't work, I suppose that is because the new Scoped storage.
I face the same issue. Have you tried an emulator with API 24? It's working for me.
On API 30 Scoped storage is enable by default, I found a workaround and open a PR https://github.com/facebook/screenshot-tests-for-android/pull/273 for this
@TimoPtr It seems that half a year since you PR #273 being kicked off, just wondering why not fix the conflicts and merge it?
Conflict has been solved, but it's not my call to merge this.
Hi @tdrhq , I know you left Facebook for a while and kickoff a great project , but it seems that this project not response the community right now as you were working for facebook.
Do you know the background of the API 29+ Scoped storage issue? It should be a paint point for most of the developers in the community :)
@liweijian I haven't been keeping track of the scoped storage issue (haven't kept up with the latest Android changes). I wonder if the right solution is to use the getDataDirectory()
. I think the assumptions based on which we chose to use the external directory may not be true anymore. (We're talking Gingerbread days, those days the emulator /data directory on default emulator images weren't big enough to store enough images for our tests.)
We don't really need the directory to be shareable by apps, we just need it to be downloadable with adb pull
(or more realistically, adb shell
with run-as
or something of the sort).