Skip to content
New issue

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

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

Already on GitHub? # to your account

test failure: Is your sdcard directory read-only? #323

Open
HussainChachuliya0306 opened this issue Jan 18, 2024 · 1 comment
Open

test failure: Is your sdcard directory read-only? #323

HussainChachuliya0306 opened this issue Jan 18, 2024 · 1 comment

Comments

@HussainChachuliya0306
Copy link

Dependencies used:

screenshot : 0.15.0
kotlin: 1.7.10
gradle: 7.5

I'm getting below error while trying to run a test:

java.lang.RuntimeException: Failed to create the directory /sdcard/screenshots/com.slopes.test/screenshots-default for screenshots. Is your sdcard directory read-only?
	at com.facebook.testing.screenshot.internal.ScreenshotDirectories.getSdcardDir(ScreenshotDirectories.java:126)

Here is my failing test:


   @Test
    fun screenshotTest() {
      mockData()

        val scenario = openFragment(r)
        scenario.onFragment {
            Screenshot.snapActivity(it.requireActivity())
                .setName("sampleTest1")
                .record()
        }

        PageObject.on<FragPageObject>()
            .verifyEmptyView()
    }
@luowei428
Copy link

hi @HussainChachuliya0306 , did you figure it out? Same error here

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

No branches or pull requests

2 participants