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 3131 */
3232public class ScreenshotUtils {
3333 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" );
3534 static final String FILETYPE = "png" ;
36- static final String SCREENSHOT_PATHNAME = SCREENSHOT_LOCATION + SCREENSHOT_FILENAME + "." + FILETYPE ;
3735 private static final Logger LOGGER = Logger .getLogger (ScreenshotUtils .class .getName ());
3836
3937 private ScreenshotUtils () {
@@ -53,7 +51,9 @@ public static File takeScreenshot(RemoteRobot remoteRobot) {
5351 if (!doesScreenshotDirExists ) {
5452 Files .createDirectory (Paths .get (SCREENSHOT_LOCATION ));
5553 }
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 );
5757 ImageIO .write (screenshotBufferedImage , FILETYPE , screenshotFile );
5858 return screenshotFile ;
5959 } catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments