File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11//usr/bin/env jbang "$0" "$@" ; exit $?
22//DEPS io.github.bonigarcia:webdrivermanager:3.8.1
33//DEPS org.seleniumhq.selenium:selenium-java:3.141.59
4+ //DEPS org.slf4j:slf4j-simple:1.7.30
45
56import static java .awt .Toolkit .getDefaultToolkit ;
67import static javax .imageio .ImageIO .write ;
910import java .awt .Robot ;
1011import java .awt .image .BufferedImage ;
1112import java .io .File ;
13+ import java .util .concurrent .TimeUnit ;
1214
1315import org .openqa .selenium .*;
1416import org .openqa .selenium .chrome .*;
@@ -27,8 +29,10 @@ public static WebDriver setupDriver() {
2729 options .addArguments ("--disable-dev-shm-usage" );
2830 options .addArguments ("--disable-browser-side-navigation" );
2931 options .addArguments ("--disable-gpu" );
30- options .setPageLoadStrategy (PageLoadStrategy .NONE );
31- return new ChromeDriver (options );
32+ options .setPageLoadStrategy (PageLoadStrategy .NONE );
33+ WebDriver driver = new ChromeDriver (options );
34+ driver .manage ().timeouts ().implicitlyWait (10 , TimeUnit .SECONDS );
35+ return driver ;
3236 }
3337
3438 public static void takeScreenShot () throws Exception {
You can’t perform that action at this time.
0 commit comments