16
16
17
17
package io .cdap .e2e .utils ;
18
18
19
- import io .github .bonigarcia .wdm .WebDriverManager ;
20
19
import org .openqa .selenium .WebDriver ;
21
20
import org .openqa .selenium .chrome .ChromeDriver ;
21
+ import org .openqa .selenium .chrome .ChromeDriverService ;
22
22
import org .openqa .selenium .chrome .ChromeOptions ;
23
23
import org .openqa .selenium .remote .HttpCommandExecutor ;
24
24
import org .openqa .selenium .remote .SessionId ;
@@ -43,7 +43,7 @@ public class SeleniumDriver {
43
43
private static ChromeDriver chromeDriver ;
44
44
45
45
SeleniumDriver () throws IOException {
46
- WebDriverManager . chromedriver ().setup ();
46
+ ChromeDriverService service = new ChromeDriverService . Builder ().build ();
47
47
ChromeOptions chromeOptions = new ChromeOptions ();
48
48
chromeOptions .addArguments ("--no-sandbox" );
49
49
chromeOptions .addArguments ("--disable-setuid-sandbox" );
@@ -52,7 +52,7 @@ public class SeleniumDriver {
52
52
chromeOptions .addArguments ("--disable-gpu" );
53
53
chromeOptions .addArguments ("--disable-dev-shm-usage" );
54
54
chromeOptions .addArguments ("--disable-features=VizDisplayCompositor" );
55
- chromeDriver = new ChromeDriver (chromeOptions );
55
+ chromeDriver = new ChromeDriver (service , chromeOptions );
56
56
chromeDriver .manage ().window ().maximize ();
57
57
HttpCommandExecutor executor = (HttpCommandExecutor ) chromeDriver .getCommandExecutor ();
58
58
url = executor .getAddressOfRemoteServer ();
0 commit comments