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()
}
Dependencies used:
I'm getting below error while trying to run a test:
Here is my failing test: