I am new to selenium. Able to configure selenium set up on Ubuntu.Configuration details given below:
But every run I am getting below error on jenkins :
Opening chrome driver
Oct 30, 2019 1:26:49 PM org.openqa.selenium.remote.DesiredCapabilities chrome
INFO: Using `new ChromeOptions()` is preferred to `DesiredCapabilities.chrome()`
[ERROR] Tests run: 3, Failures: 1, Errors: 0, Skipped: 2, Time elapsed: 0.998 s <<< FAILURE! - in TestSuite
[ERROR] setUp(com.test.WebAppTitleTestOnChrome) Time elapsed: 0.895 s <<< FAILURE!
org.openqa.selenium.remote.UnreachableBrowserException:
Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Please suggest me.
The reason why this happens.
Solution:- Change the way to create RemoteWebDriver.
ClientConfig config = ClientConfig.defaultConfig().connectionTimeout(Duration.ofMinutes(20))
.readTimeout(Duration.ofMinutes(20)); // I change this 3 minute(Default) to 20 minutes.
WebDriver remoteWebDriver = RemoteWebDriver.builder().oneOf(caps).address(gridUrl).config(config).build(); // now you can use this remoteWebDriver.
This error message...
org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session.
Possible causes are invalid address of the remote server or browser start-up failure.
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue possibly is the incompatibility between the version of the binaries you are using as follows:
Supports Chrome v67-69
So there might be a mismatch between the JDK version , Selenium Client version , ChromeDriver v2.41 and the Chrome Browser v68.0
Ensure that:
@Test
as non-root user.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With