I am trying to run my suite in oracle linux server release 7.6 run there is also chrome 76 is installed in the server when i try to run both with chrome and headless chrom,everytime its giving the follwing error
Even i tried from chrome 246 driver to chrome 79 driver on hit and trial basis,but no luck
org.openqa.selenium.WebDriverException: unknown error: DevToolsActivePort file doesn't exist Build info: version: 'unknown', revision: 'unknown', time: 'unknown' System info: host: 'arusprint02', ip: '100.104.104.102', os.name: 'Linux', os.arch: 'amd64', os.version: '4.14.35-1902.3.1.el7uek.x86_64', java.version: '1.8.0_222' Driver info: driver.version: ChromeDriver remote stacktrace: #0 0x55c9ab4f1129
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$new$0(W3CHandshakeResponse.java:57)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$getResponseFunction$2(W3CHandshakeResponse.java:104)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:122)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:125)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:548)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:212)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:130)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:157)
at utils.Intelligence_Browser.SetconfigurationBrowser(Intelligence_Browser.java:142)
at utils.RunnerArf.main(RunnerArf.java:80)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
..
Code i am using here
} else if (Browser.equalsIgnoreCase("chrome")) { System.out.println("Chrome is Starting"); String chromedriverPath = PropertyfileConfig.getStringValueFromProperty("chromedriverpath");
System.setProperty("webdriver.chrome.driver", chromedriverPath);
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
ChromeOptions options = new ChromeOptions();
options.addArguments("test-type");
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
capabilities.setCapability("chrome.binary", "<Path to binary>");
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
driver = new ChromeDriver();
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
//driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
System.out.println("Chrome driver selected");
driver.get(Url);
} else if (Browser.equalsIgnoreCase("headless")) {
String chromedriverPath = PropertyfileConfig.getStringValueFromProperty("chromedriverpath");
System.setProperty("webdriver.chrome.driver", chromedriverPath);
ChromeOptions options = new ChromeOptions();
options.addArguments("--no-sandbox");
options.addArguments("--disable-dev-shm-usage");
options.addArguments("--disable-gpu");
options.addArguments("--disable-extensions");
options.setExperimentalOption("useAutomationExtension", false);
options.addArguments("--proxy-server='direct://'");
options.addArguments("--proxy-bypass-list=*");
options.addArguments("--start-maximized");
options.addArguments("--headless");
driver = new ChromeDriver(options);
driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
driver.get(Url);
Aucun commentaire:
Enregistrer un commentaire