Skip to content

Commit fca6aac

Browse files
committed
chore: use only downloads dir
1 parent e65b724 commit fca6aac

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

app/src/androidTest/java/com/sample/browserstack/samplecalculator/NativeScreenshot.java

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -88,20 +88,8 @@ private static StackTraceElement extractStackElement(StackTraceElement[] trace,
8888
}
8989

9090
private static class EspressoScreenCaptureProcessor extends BasicScreenCaptureProcessor {
91-
private static final String SCREENSHOT = "screenshot";
91+
private static final String SCREENSHOT = "screenshots";
9292

93-
/**
94-
* There are 2 kinds of directories where screenshots can be stored:
95-
* Option 1:
96-
* Path: /storage/emulated/0/Android/data/<bundleId>/files/screenshots/<className>
97-
* Code snippet:
98-
* File screenshotDir = new File(String.valueOf(ApplicationProvider.getApplicationContext().getExternalFilesDir(null)), SCREENSHOT);
99-
*
100-
* Option 2:
101-
* Path: /storage/emulated/0/Download/screenshots
102-
* Code snippet:
103-
* File screenshotDir = new File(String.valueOf(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)), SCREENSHOT);
104-
*/
10593
EspressoScreenCaptureProcessor() {
10694
File screenshotDir = new File(String.valueOf(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)), SCREENSHOT);
10795
File classDir = new File(screenshotDir, className);

0 commit comments

Comments
 (0)