File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/util/driver Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -106,13 +106,15 @@ public static void wait(int seconds) throws InterruptedException {
106106 sleep (1000 * seconds );
107107 }
108108
109- public static void takeScreenshot (WebDriver driver ) throws Exception {
109+ public static String takeScreenshot (WebDriver driver ) throws Exception {
110110 String fullFileName = System .getProperty ("user.dir" )
111111 + "/target/reports/screenshots/screenshot_"
112112 + System .currentTimeMillis () + ".png" ;
113113
114114 File screenshot = ((TakesScreenshot ) driver ).getScreenshotAs (OutputType .FILE );
115115 FileUtils .copyFile (screenshot , new File (fullFileName ));
116+
117+ return fullFileName ;
116118 }
117119
118120 public static void hideKeyboard (AppiumDriver driver ) {
You can’t perform that action at this time.
0 commit comments