Wednesday, February 5, 2025

selenium webdriver – Chrome for Testing browser is crashing


Whereas operating the Selenium take a look at to invoke the Chrome for Testing browser, it’s crashing.

Code:

ChromeOptions choices = new ChromeOptions();

choices.setBrowserVersion("130.0.6723.116");

WebDriver driver = new ChromeDriver(choices);

driver.navigate().to("https://www.google.com");

Anticipated Outcome: It ought to launch the CfT model 130.0.6723.116.

Precise Outcome: It launches the browser however it’s crashing.

Exception:

org.openqa.selenium.SessionNotCreatedException: Couldn't begin a brand new session. Attainable causes are invalid deal with of the distant server or browser start-up failure. 
Host data: host: 'INM122110', ip: '192.168.0.105'
    at org.openqa.selenium.distant.RemoteWebDriver.execute(RemoteWebDriver.java:563)
    at org.openqa.selenium.distant.RemoteWebDriver.startSession(RemoteWebDriver.java:245)
    at org.openqa.selenium.distant.RemoteWebDriver.(RemoteWebDriver.java:174)
    at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:114)
    at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88)
    at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:83)
    at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:72)
    at com.rc.alm.it.exams.utilities.setup.WebBrowserConfigurator.invokeChromeDriver(WebBrowserConfigurator.java:115)
    at com.rc.alm.it.exams.utilities.setup.WebBrowserConfigurator.openBrowser(WebBrowserConfigurator.java:58)
    at com.rc.alm.it.gadgetbasetests.GadgetBaseTest.setup(GadgetBaseTest.java:90)
    at java.base/jdk.inner.replicate.NativeMethodAccessorImpl.invoke0(Native Technique)
    at java.base/jdk.inner.replicate.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.inner.replicate.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.replicate.Technique.invoke(Technique.java:566)
    at org.testng.inner.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:141)
    at org.testng.inner.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:71)
    at org.testng.inner.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:400)
    at org.testng.inner.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:333)
    at org.testng.inner.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:188)
    at org.testng.inner.invokers.TestMethodWorker.run(TestMethodWorker.java:128)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
    at org.testng.TestRunner.privateRun(TestRunner.java:739)
    at org.testng.TestRunner.run(TestRunner.java:614)
    at org.testng.SuiteRunner.runTest(SuiteRunner.java:421)
    at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:413)
    at org.testng.SuiteRunner.privateRun(SuiteRunner.java:373)
    at org.testng.SuiteRunner.run(SuiteRunner.java:312)
    at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
    at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
    at org.testng.TestNG.runSuitesSequentially(TestNG.java:1274)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1208)
    at org.testng.TestNG.runSuites(TestNG.java:1112)
    at org.testng.TestNG.run(TestNG.java:1079)
    at org.testng.distant.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
    at org.testng.distant.RemoteTestNG.initAndRun(RemoteTestNG.java:293)
    at org.testng.distant.RemoteTestNG.principal(RemoteTestNG.java:91)
Attributable to: org.openqa.selenium.TimeoutException: java.util.concurrent.TimeoutException
Construct data: model: '4.27.0', revision: 'd6e718d134'
System data: os.title: 'Home windows 10', os.arch: 'amd64', os.model: '10.0', java.model: '11.0.19'
Driver data: driver.model: ChromeDriver
    at org.openqa.selenium.distant.http.jdk.JdkHttpClient.execute(JdkHttpClient.java:423)
    at org.openqa.selenium.distant.ProtocolHandshake.createSession(ProtocolHandshake.java:89)
    at org.openqa.selenium.distant.ProtocolHandshake.createSession(ProtocolHandshake.java:75)
    at org.openqa.selenium.distant.ProtocolHandshake.createSession(ProtocolHandshake.java:61)
    at org.openqa.selenium.distant.HttpCommandExecutor.execute(HttpCommandExecutor.java:162)
    at org.openqa.selenium.distant.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216)
    at org.openqa.selenium.distant.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174)
    at org.openqa.selenium.distant.RemoteWebDriver.execute(RemoteWebDriver.java:545)
    ... 35 extra
Attributable to: java.util.concurrent.TimeoutException
    at java.base/java.util.concurrent.CompletableFuture$Timeout.run(CompletableFuture.java:2792)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.name(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Employee.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)

Working System: Home windows, Linux

Selenium 4.27.0 and Java model 11

Chrome for Testing model 130.0.6723.116

ChromeDriver model 130.0.6723.116

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles

PHP Code Snippets Powered By : XYZScripts.com