@ -22,8 +22,10 @@ import org.apache.dolphinscheduler.util.PropertiesReader;
import org.openqa.selenium.JavascriptExecutor ;
import org.openqa.selenium.JavascriptExecutor ;
import org.openqa.selenium.WebDriver ;
import org.openqa.selenium.WebDriver ;
import org.openqa.selenium.chrome.ChromeDriver ;
import org.openqa.selenium.chrome.ChromeDriver ;
import org.openqa.selenium.chrome.ChromeOptions ;
import java.io.IOException ;
import java.io.IOException ;
import java.util.concurrent.TimeUnit ;
import java.util.concurrent.TimeUnit ;
import org.openqa.selenium.PageLoadStrategy ;
/ * *
/ * *
* base driver class
* base driver class
@ -81,7 +83,16 @@ public class BaseDriver {
public void startBrowser ( ) throws Exception {
public void startBrowser ( ) throws Exception {
// set chrome driver
// set chrome driver
System . setProperty ( "webdriver.chrome.driver" , chromeDriverPath ) ;
System . setProperty ( "webdriver.chrome.driver" , chromeDriverPath ) ;
driver = new ChromeDriver ( ) ;
ChromeOptions chromeOptions = new ChromeOptions ( ) ;
chromeOptions . setPageLoadStrategy ( PageLoadStrategy . NONE ) ;
chromeOptions . addArguments ( "--no-sandbox" ) ;
chromeOptions . addArguments ( "--disable-dev-shm-usage" ) ;
chromeOptions . addArguments ( "--headless" ) ;
chromeOptions . addArguments ( "--disable-gpu" ) ;
chromeOptions . addArguments ( "--whitelisted-ips" ) ;
chromeOptions . addArguments ( "--disable-infobars" ) ;
chromeOptions . addArguments ( "--disable-browser-side-navigation" ) ;
driver = new ChromeDriver ( chromeOptions ) ;
/* driver setting wait time */
/* driver setting wait time */
// implicitly wait time
// implicitly wait time