File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/com/redhat/devtools/intellij/commonuitest/utils/screenshot Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 31
31
*/
32
32
public class ScreenshotUtils {
33
33
static final String SCREENSHOT_LOCATION = "." + File .separator + "build" + File .separator + "screenshots" + File .separator ;
34
- static final String SCREENSHOT_FILENAME = getTimeNow ("yyyy_MM_dd_HH_mm_ss" );
35
34
static final String FILETYPE = "png" ;
36
- static final String SCREENSHOT_PATHNAME = SCREENSHOT_LOCATION + SCREENSHOT_FILENAME + "." + FILETYPE ;
37
35
private static final Logger LOGGER = Logger .getLogger (ScreenshotUtils .class .getName ());
38
36
39
37
private ScreenshotUtils () {
@@ -53,7 +51,9 @@ public static File takeScreenshot(RemoteRobot remoteRobot) {
53
51
if (!doesScreenshotDirExists ) {
54
52
Files .createDirectory (Paths .get (SCREENSHOT_LOCATION ));
55
53
}
56
- File screenshotFile = new File (SCREENSHOT_PATHNAME );
54
+ String screenshotFilename = getTimeNow ("yyyy_MM_dd_HH_mm_ss" );
55
+ String screenshotPathname = SCREENSHOT_LOCATION + screenshotFilename + "." + FILETYPE ;
56
+ File screenshotFile = new File (screenshotPathname );
57
57
ImageIO .write (screenshotBufferedImage , FILETYPE , screenshotFile );
58
58
return screenshotFile ;
59
59
} catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments