Closed amsuhail88 closed 11 months ago
Am also facing the same issue
Serenity version : 3.9.8
Make sure your driver is up to date, or being downloaded automatically, and try with 4.0.0
It will get downloaded automatically.
webdriver { driver = chrome autodownload = true timeouts { implicitlywait = 10000 fluentwait = 20000 } }
In version 4.0.0 also, I am facing the same issue.
"net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver"
WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver WebDriver reported the following message: Unable to obtain: Capabilities {acceptInsecureCerts: false, browserName: chrome, goog:chromeOptions: {args: [remote-allow-origins=*, --headless=chrome, --window-size=1920,1080, --test-type, --no-sandbox, --ignore-certificate-errors, --disable-popup-blocking, --disable-default-apps, --disable-extensions-file-a..., --incognito, --disable-infobars, --disable-gpu, --whitelisted-ips=\"\, --headless], extensions: []}}, error Command failed with code: 65, executed: [/var/folders/0c/nhkz63nd3t3fkzpjm7tlyfgh0000gp/T/selenium-manager2602678281054115694520988929157793/selenium-manager, --browser, chrome, --output, json] request or response body error: error reading a body from connection: timed out Build info: version: '4.11.0', revision: '040bc5406b' System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '12.5.1', java.version: '11.0.17' Driver info: driver.version: ChromeDriver See below for more details.
Same issue here. using Serenity 4.0.0-beta2. Have to play around now with proxy settings and etc.
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver
WebDriver reported the following message: Unable to obtain: Capabilities {acceptInsecureCerts: true, acceptSslCerts: true, browserName: chrome, goog:chromeOptions: {args: [start-maximized, test-type, no-sandbox, ignore-certificate-errors, --window-size=1920,1080, incognito, disable-infobars, disable-gpu, disable-default-apps, disable-popup-blocking, disable-extensions-file-acc..., ignore-ssl-errors=yes, disable-extensions, start-maximized, test-type, no-sandbox, ignore-certificate-errors, --window-size=1920,1080, incognito, disable-infobars, disable-gpu, disable-default-apps, disable-popup-blocking, disable-extensions-file-acc..., ignore-ssl-errors=yes, disable-extensions, --no-sandbox, --ignore-certificate-errors, --homepage=about:blank, --no-first-run, --remote-allow-origins=*], extensions: [], prefs: {download.default_directory: C:\Projects\SampleProject\s..., download.prompt_for_download: false, safebrowsing.enabled: false}}, handlesAlerts: true, validateTLSCertificates: false}, error Command failed with code: 65, executed: [C:\Users\omg\AppData\Local\Temp\selenium-manager135181642090003675898723334935746\selenium-manager.exe, --browser, chrome, --output, json]
error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): error trying to connect: tcp connect error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. (os error 10060)
Appears to be a Chrome/ChromeDriver issue related to Chrome 116. We need to wait for Google to fix the issue on their side.
It looks like installing Chrome for Testing resolves this issue (https://developer.chrome.com/blog/chrome-for-testing/)
It looks like installing Chrome for Testing resolves this issue (https://developer.chrome.com/blog/chrome-for-testing/)
So is this SeleniumManager change??
No, it's related to Chrome - nothing to do with Selenium or Serenity.
Just wanted to add that we ran into the same error message as in the issue title this morning and updating to Serenity 4.0.0-beta-2
(and more importantly, Selenium 4.11.0 which this new Serenity version uses) addressed it.
Some background information for those unfamiliar with the changes: https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/
No problems on our end with any DriverConfigurationError
.
Hope you'll be able to release a stable 4.0.0
version soon, @wakaleo, I don't like using beta versions ;)
@wakaleo : We need to update webdrivermanager version to 5.4.1 to resolve this issue.
@amsuhail88 : if you update your POM/build.gradle with the the latest webdrivermanager then it will resolve your issue "io.github.bonigarcia:webdrivermanager:5.4.1"
Webdrivermanager is no longer used in 4.0.0 (we use the native Selenium version instead)
Appears to be a Chrome/ChromeDriver issue related to Chrome 116. We need to wait for Google to fix the issue on their side.
Hi @wakaleo ,
i was able to resolve this issue by adding proxy to webdriver chrome capabilities
webdriver {
driver = chrome
autodownload=true
timeouts {
implicitlywait=60000
fluentwait=60000
}
wait.for.timeout=60000
capabilities {
proxy {
httpProxy = "username:password@proxy:port"
}
browserName = "chrome"
acceptInsecureCerts = true
# acceptSslCerts = true
# handlesAlerts = true
# validateTLSCertificates=false
"goog:chromeOptions" {
args = ["start-maximized", "remote-allow-origins=*", "test-type", "no-sandbox", "ignore-certificate-errors", "--window-size=1920,1080"
"incognito", "disable-infobars", "disable-gpu", "disable-default-apps", "disable-popup-blocking", "disable-extensions-file-access-check",
"ignore-ssl-errors=yes", "disable-extensions"],
prefs {
download.default_directory=${user.dir}"\\src\\test\\resources\\downloads"
download.prompt_for_download = false
safebrowsing.enabled=false
}
}
}
}
If anyone else is having this issue either upgrade the WebdriverManager version to minimum 5.4.0 or download the Chrome for Testing ChromeDriver. Serenity 3.9.8 uses WebdriverManager 5.3.2 which does not support the Chrome for testing ChromeDrivers.
If anyone else is having this issue either upgrade the WebdriverManager version to minimum 5.4.0 or download the Chrome for Testing ChromeDriver. Serenity 3.9.8 uses WebdriverManager 5.3.2 which does not support the Chrome for testing ChromeDrivers.
Thank you @StevenKolamkuzhiyil webdrivermanager 5.4.1 worked for us. this helped us to not upgrade serenity to 4.0.0-beta-2 which has so many package changes. we will wait for official serenity 4.0.0 version, untill then we will use WDM 5.4.1
@wakaleo : We need to update webdrivermanager version to 5.4.1 to resolve this issue.
@amsuhail88 : if you update your POM/build.gradle with the the latest webdrivermanager then it will resolve your issue "io.github.bonigarcia:webdrivermanager:5.4.1"
@wakaleo Where would i change this in serenity??
There is nothing to change: in Serenity 4.0.0, we have removed webdrivermanager entirely so there is nothing to update.
Hi John, what is the solution to resolve the isse as i am 116.0 chrome version with serinity.
Kind regards Jerrin
On Mon, Aug 21, 2023 at 10:27 AM John Ferguson Smart < @.***> wrote:
There is nothing to change: in Serenity 4.0.0, we have removed webdrivermanager entirely so there is nothing to update.
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1685973842, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKNDXDIW3ZK7WCD6Q4TXWMSZ7ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you commented.Message ID: @.***>
Use 4.0.0-beta-2 and Chrome for Testing
Sorry,Could you please tell me where i can check that in serenity framework.
On Mon, Aug 21, 2023 at 12:02 PM John Ferguson Smart < @.***> wrote:
Use 4.0.0-beta-2 and Chrome for Testing
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1686113295, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKPW4PVYBXLQDXGJARLXWM533ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you commented.Message ID: @.***>
I'm not sure I understand the question. There seem to be a few workarounds proposed, but I found that installing Chrome for Testing makes Chrome tests work with Webdriver correctly.
Just to add to that, you may not even have to install Chrome for Testing. I definitely didn't, not locally, not on our build agents, and we managed to get things back to life again.
What you definitely need to do is upgrade to 4.0.0-beta-2
, because that depends on Selenium 4.11 and that's the Selenium version that introduces the new and improved way of dealing with drivers: https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/
So I'd recommend:
Hi Das,
Currently I am getting the below error .
11:15:51.985 [main] INFO n.s.c.w.d.ChromeDriverProvider - Using automatically driver download 11:15:55.049 [main] ERROR i.g.bonigarcia.wdm.online.HttpClient - Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 11:15:55.049 [main] WARN i.g.b.wdm.versions.VersionDetector - Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116) 11:15:55.207 [main] INFO i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\Jerrin.Rajan.cache\selenium\chromedriver\win32\114.0.5735.90\chromedriver.exe Starting ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}) on port 57395 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. 11:16:00.001 [main] WARN c.u.u.f.utils.InteractionUtils - *** Failed to open Chromedriver, retrying 11:16:00.002 [main] INFO n.s.c.w.d.ChromeDriverProvider - Using automatically driver download 11:16:00.696 [main] ERROR i.g.bonigarcia.wdm.online.HttpClient - Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 11:16:00.696 [main] WARN i.g.b.wdm.versions.VersionDetector - Exception reading https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116 to get latest version of chromedriver (Error HTTP 404 executing https://chromedriver.storage.googleapis.com/LATEST_RELEASE_116) 11:16:00.818 [main] INFO i.g.bonigarcia.wdm.WebDriverManager - Exporting webdriver.chrome.driver as C:\Users\Jerrin.Rajan.cache\selenium\chromedriver\win32\114.0.5735.90\chromedriver.exe Starting ChromeDriver 114.0.5735.90 (386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}) on port 49797 Only local connections are allowed. Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully.
Step failed
net.thucydides.core.webdriver.DriverConfigurationError: Could not
instantiate class org.openqa.selenium.chrome.ChromeDriver
at
net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:144)
at
net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:132)
at
net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:102)
at
net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:172)
at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:981)
at net.serenitybdd.core.pages.PageObject.open(PageObject.java:839)
at net.serenitybdd.core.pages.PageObject.open(PageObject.java:824)
at
com.unilink.ucase.frontend.utils.InteractionUtils.openPage(InteractionUtils.java:1452)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openPage$accessor$319TUS7b(Unknown
Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18)
at
net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18)
at
net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:407)
at
net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:192)
at
net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:85)
at
net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openPage(Unknown
Source)
at
com.unilink.ucase.frontend.actions.UserDashboardActions.openUserDashboard(UserDashboardActions.java:28)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openUserDashboard$accessor$319TUS7b(Unknown
Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18)
at
net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18)
at
net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:407)
at
net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:192)
at
net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:85)
at
net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openUserDashboard(Unknown
Source)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.login(LoginStepDefs.java:64)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.login(LoginStepDefs.java:44)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.iAmOnTheUserDashBoard(LoginStepDefs.java:69)
at ✽.I have logged in and am on the user
dashboard(file:///C:/Repos/ucase-bdd/src/test/resources/features/frontend/ko/partyservice/casework/incomingmandate/IncomingMandateUI.feature:457)
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: Could
not instantiate new WebDriver instance of type class
org.openqa.selenium.chrome.ChromeDriver (Could not start a new session.
Response code 500. Message: session not created: This version of
ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97 with binary path C:\Program Files
(x86)\Google\Chrome\Application\chrome.exe
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'UNISOFT141', ip: '192.168.0.115', os.name: 'Windows
10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.8'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities
{acceptInsecureCerts: false, browserName: chrome, goog:chromeOptions:
{args: [--homepage=about:blank,--te..., --no-first-run, --no-sandbox,
--disable-logging, --ignore-certificate-errors, \n
--di..., --disable-default-apps, --disable-extensions-file-a...,
--incognito, --remote-allow-origins=, \n --di...,
--disable-gpu, --lang=en-GB, --window-size=1920,1080,
--disable-dev-shm-usage, --site-per-process,
--disable-ipc-flooding-prot...], extensions: []}}],
desiredCapabilities=Capabilities {acceptInsecureCerts: false, base.url:
http://localhost, browserName: chrome, driver: chrome, fluentwait: 10000,
goog:chromeOptions: {args: [--homepage=about:blank,--te..., --no-first-run,
--no-sandbox, --disable-logging, --ignore-certificate-errors, \n
--di..., --disable-default-apps, --disable-extensions-file-a...,
--incognito, --remote-allow-origins=, \n --di...,
--disable-gpu, --lang=en-GB, --window-size=1920,1080,
--disable-dev-shm-usage, --site-per-process,
--disable-ipc-flooding-prot...], extensions: []}, timeouts.implicitlywait:
10000, use.driver.service.pool: false}}]). See below for more details.
at
net.thucydides.core.webdriver.WebDriverFactory.newWebdriverInstance(WebDriverFactory.java:146)
at
net.thucydides.core.webdriver.WebDriverFacade.newDriverInstance(WebDriverFacade.java:141)
at
net.thucydides.core.webdriver.WebDriverFacade.newProxyDriver(WebDriverFacade.java:132)
at
net.thucydides.core.webdriver.WebDriverFacade.getProxiedDriver(WebDriverFacade.java:102)
at
net.thucydides.core.webdriver.WebDriverFacade.get(WebDriverFacade.java:172)
at net.serenitybdd.core.pages.PageObject.openPageAtUrl(PageObject.java:981)
at net.serenitybdd.core.pages.PageObject.open(PageObject.java:839)
at net.serenitybdd.core.pages.PageObject.open(PageObject.java:824)
at
com.unilink.ucase.frontend.utils.InteractionUtils.openPage(InteractionUtils.java:1452)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openPage$accessor$319TUS7b(Unknown
Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18)
at
net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18)
at
net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:407)
at
net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:192)
at
net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:85)
at
net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openPage(Unknown
Source)
at
com.unilink.ucase.frontend.actions.UserDashboardActions.openUserDashboard(UserDashboardActions.java:28)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openUserDashboard$accessor$319TUS7b(Unknown
Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at
net.thucydides.core.steps.BaseMethodRunner.invokeMethod(BaseMethodRunner.java:18)
at
net.thucydides.core.steps.NormalMethodRunner.invokeMethodAndNotifyFailures(NormalMethodRunner.java:18)
at
net.thucydides.core.steps.StepInterceptor.runNormalMethod(StepInterceptor.java:407)
at
net.thucydides.core.steps.StepInterceptor.testStepResult(StepInterceptor.java:192)
at
net.thucydides.core.steps.StepInterceptor.intercept(StepInterceptor.java:85)
at
net.thucydides.core.steps.ProxyConfiguration$InterceptorDispatcher.intercept(ProxyConfiguration.java:51)
at
com.unilink.ucase.frontend.actions.UserDashboardActions$ByteBuddy$HQ7bJrHG.openUserDashboard(Unknown
Source)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.login(LoginStepDefs.java:64)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.login(LoginStepDefs.java:44)
at
com.unilink.ucase.frontend.stepdefinitions.LoginStepDefs.iAmOnTheUserDashBoard(LoginStepDefs.java:69)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at io.cucumber.java.Invoker.doInvoke(Invoker.java:66)
at io.cucumber.java.Invoker.invoke(Invoker.java:24)
at
io.cucumber.java.AbstractGlueDefinition.invokeMethod(AbstractGlueDefinition.java:47)
at io.cucumber.java.JavaStepDefinition.execute(JavaStepDefinition.java:29)
at
io.cucumber.core.runner.CoreStepDefinition.execute(CoreStepDefinition.java:66)
at
io.cucumber.core.runner.PickleStepDefinitionMatch.runStep(PickleStepDefinitionMatch.java:63)
at io.cucumber.core.runner.ExecutionMode$1.execute(ExecutionMode.java:10)
at io.cucumber.core.runner.TestStep.executeStep(TestStep.java:92)
at io.cucumber.core.runner.TestStep.run(TestStep.java:64)
at
io.cucumber.core.runner.PickleStepTestStep.run(PickleStepTestStep.java:51)
at io.cucumber.core.runner.TestCase.run(TestCase.java:104)
at io.cucumber.core.runner.Runner.runPickle(Runner.java:73)
at io.cucumber.core.runtime.Runtime.lambda$execute$5(Runtime.java:110)
at
io.cucumber.core.runtime.CucumberExecutionContext.runTestCase(CucumberExecutionContext.java:117)
at io.cucumber.core.runtime.Runtime.lambda$execute$6(Runtime.java:110)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at
io.cucumber.core.runtime.Runtime$SameThreadExecutorService.execute(Runtime.java:233)
at
java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at io.cucumber.core.runtime.Runtime.lambda$run$2(Runtime.java:86)
at
java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.stream.SliceOps$1$1.accept(SliceOps.java:199)
at
java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632)
at
java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
at
java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
at
java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at
java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at
java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at io.cucumber.core.runtime.Runtime.run(Runtime.java:87)
at net.serenitybdd.cucumber.cli.Main.run(Main.java:27)
at net.serenitybdd.cucumber.cli.Main.main(Main.java:18)
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start
a new session. Response code 500. Message: session not created: This
version of ChromeDriver only supports Chrome version 114
Current browser version is 116.0.5845.97 with binary path C:\Program Files
(x86)\Google\Chrome\Application\chrome.exe
Build info: version: '4.0.0', revision: '3a21814679'
System info: host: 'UNISOFT141', ip: '192.168.0.115', os.name: 'Windows
10', os.arch: 'amd64', os.version: '10.0', java.version: '11.0.8'
Driver info: org.openqa.selenium.chrome.ChromeDriver
Command: [null, newSession {capabilities=[Capabilities
{acceptInsecureCerts: false, browserName: chrome, goog:chromeOptions:
{args: [--homepage=about:blank,--te..., --no-first-run, --no-sandbox,
--disable-logging, --ignore-certificate-errors, \n
--di..., --disable-default-apps, --disable-extensions-file-a...,
--incognito, --remote-allow-origins=, \n --di...,
--disable-gpu, --lang=en-GB, --window-size=1920,1080,
--disable-dev-shm-usage, --site-per-process,
--disable-ipc-flooding-prot...], extensions: []}}],
desiredCapabilities=Capabilities {acceptInsecureCerts: false, base.url:
http://localhost, browserName: chrome, driver: chrome, fluentwait: 10000,
goog:chromeOptions: {args: [--homepage=about:blank,--te..., --no-first-run,
--no-sandbox, --disable-logging, --ignore-certificate-errors, \n
--di..., --disable-default-apps, --disable-extensions-file-a...,
--incognito, --remote-allow-origins=, \n --di...,
--disable-gpu, --lang=en-GB, --window-size=1920,1080,
--disable-dev-shm-usage, --site-per-process,
--disable-ipc-flooding-prot...], extensions: []}, timeouts.implicitlywait:
10000, use.driver.service.pool: false}}]
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:84)
at
org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:62)
at
org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156)
at
org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:164)
at
org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:139)
at
org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:559)
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:246)
at
org.openqa.selenium.remote.RemoteWebDriver.
On Mon, Aug 21, 2023 at 12:45 PM Bas Dijkstra @.***> wrote:
Just to add to that, you may not even have to install Chrome for Testing. I definitely didn't, not locally, not on our build agents, and we managed to get things back to life again.
What you definitely need to do is upgrade to 4.0.0-beta-2, because that depends on Selenium 4.11 and that's the Selenium version that introduces the new and improved way of dealing with drivers: https://www.selenium.dev/blog/2023/whats-new-in-selenium-manager-with-selenium-4.11.0/
So I'd recommend:
- Upgrade Serenity to 4.0.0-beta-2 and see if that resolves your problem
- If not, install Chrome for Testing and see if that resolves your problem
- If still not, come back here with a more detailed error report
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1686176761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKKG5HM4ULBAF556XDDXWNC5HANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you commented.Message ID: @.***>
Hi @jerrin89 : You need to update your JDK version( if you are using 1.8) to use latest bonigarcia lib 5.4.X
@ bachhavdipak currently am using JDk 11.0.8
On Mon, Aug 21, 2023 at 3:59 PM bachhavdipak @.***> wrote:
Hi @jerrin89 https://github.com/jerrin89 : You need to update your JDK version( if you are using 1.8) to use latest bonigarcia lib 5.4.X
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1686495547, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKIWSMPBKMGP2SFRL7TXWNZU3ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.***>
@jerrin89 have you upgraded to Serenity 4.0.0-beta-2? Because I still see references to bonigarcia’s webdrivermanager in there, and I don’t think you need that anymore.
What dependencies do you have in your Maven or Gradle project file?
Also, have you tried both with and without installing Chrome for Testing?
@ bachhavdipak currently am using JDk 11.0.8 … On Mon, Aug 21, 2023 at 3:59 PM bachhavdipak @.> wrote: Hi @jerrin89 https://github.com/jerrin89 : You need to update your JDK version( if you are using 1.8) to use latest bonigarcia lib 5.4.X — Reply to this email directly, view it on GitHub <#3227 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKIWSMPBKMGP2SFRL7TXWNZU3ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.>
Do the following.
if u r using serenity bdd version less than 3.x.x version, do the following
if you are using serenity 4.x.x version, let me know i will tell you the steps for the same also
Hi Sudheer1437, I tried the above one and it's not working. Please see below as it is still pointing to 114.0.5735. [image: image.png] [image: image.png]
On Mon, Aug 21, 2023 at 5:13 PM sudheer1437 @.***> wrote:
@ bachhavdipak currently am using JDk 11.0.8 … <#m-6977884022597492328> On Mon, Aug 21, 2023 at 3:59 PM bachhavdipak @.> wrote: Hi @jerrin89 https://github.com/jerrin89 https://github.com/jerrin89 https://github.com/jerrin89 : You need to update your JDK version( if you are using 1.8) to use latest bonigarcia lib 5.4.X — Reply to this email directly, view it on GitHub <#3227 (comment) https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1686495547>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKIWSMPBKMGP2SFRL7TXWNZU3ANCNFSM6AAAAAA3SMC5KQ https://github.com/notifications/unsubscribe-auth/AOU5GKIWSMPBKMGP2SFRL7TXWNZU3ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.>
Do the following.
if u r using serenity bdd version less than 3.x.x version, do the following
- Add below WDM dependency to your maven pom or gradle build
io.github.bonigarcia webdrivermanager 5.4.1 2. Update the dependencies 3. Delete the folder C:\Users\xxxxxx.cache\selenium\chromedriver 4. Now run your project
if you are using serenity 4.x.x version, let me know i will tell you the steps for the same also
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1686622171, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKK7727GNCLABE5HHTTXWOCJRANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.***>
Asking once more, @jerrin89, which version of Serenity are you using at the moment?
Hi Das,Am using SernityCoreVersion:’3.1.10’Sent from my iPhoneOn 22 Aug 2023, at 7:06 am, Bas Dijkstra @.***> wrote: Asking once more, @jerrin89, which version of Serenity are you using at the moment?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
ext { slf4jVersion = '1.7.7' serenityCoreVersion = '3.1.10' serenityCucumberVersion = '3.1.10' serenityRestAssuredVersion = '3.1.10' junitVersion = '4.13.1' assertJVersion = '3.8.0' logbackVersion = '1.2.3'
// serenityJiraVersion = '1.12.0'
sql2oVersion = '1.6.0'
mssqlJdbcVersion = '9.4.0.jre11'
lombokVersion = '1.18.20'
jacksonJsrVersion = '2.12.5'
jsonSchemaValidatorVersion = '4.1.0'
ucaseApiCommonsVersion = "0.5.55"
jsonVersion = '20201115'
hikariCpVersion = '5.0.0'
rabbitMQClientversion = '5.10.0'
springKafkaVersion = '2.8.2'
}
On Tue, Aug 22, 2023 at 7:06 AM Bas Dijkstra @.***> wrote:
Asking once more, @jerrin89 https://github.com/jerrin89, which version of Serenity are you using at the moment?
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1687497913, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKO3OF5ZOBIVXEFHU2TXWRD45ANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.***>
@jerrin89 do you have problems with upgrading to Serenity 4.0.0-beta-2 ?
Again, that solved all of our problems over here, because it depends on Selenium 4.11, not 4.10, and 4.11 introduced a new and improved way of managing driver binaries. I posted a link to the blog post from the Selenium team earlier in this thread.
I Have tried all the options but still no help.
On Tue, Aug 22, 2023 at 8:51 AM Bas Dijkstra @.***> wrote:
@jerrin89 https://github.com/jerrin89 do you have problems with upgrading to Serenity 4.0.0-beta-2 ?
Again, that solved all of our problems over here, because it depends on Selenium 4.11, not 4.10, and 4.11 introduced a new and improved way of managing driver binaries. I posted a link to the blog post from the Selenium team earlier in this thread.
— Reply to this email directly, view it on GitHub https://github.com/serenity-bdd/serenity-core/issues/3227#issuecomment-1687657859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOU5GKI6HUJ5WPYLXOE62ALXWRQHXANCNFSM6AAAAAA3SMC5KQ . You are receiving this because you were mentioned.Message ID: @.***>
@jerrin89 if you need more in-depth support please raise a support request here so that we can look directly at your project: https://www.serenity-dojo.com/serenity-bdd-enterprise-support
Another solution for Chrome 116 issue is to upgrade webdrivermanager to v5.5.0 (in pom) so that it can download the binaries of CfT automatically
Is there any solution for this yet after V116 upgrade I am still facing issues : my pom.xml has this dependency
<artifactId>selenium-chrome-driver</artifactId>
<version>4.1.2</version>
</dependency>
and Here is my serenity.conf file code. serenity { take.screenshots = FOR_FAILURES } webdriver { driver = chrome autodownload = true } headless.mode = false chrome.switches = "--start-maximized;--window-size=1920,1080;--remote-allow-origins=*"
Update to 4.0.0
@wakaleo I am still getting error with 4.0.0-beta-2 '[ERROR] org/openqa/selenium/internal/Shutdown Hooks$Hook Execution Strategy' And with 4.0.0 i still see error is resolving dependencies , here are my few dependencies form pom.xml
net.serenity-bdd
There is no such version as 4.0.0, it should be 4.0.0-beta-6. please check
net.serenity-bdd
There is no such version as 4.0.0, it should be 4.0.0-beta-6. please check Have changes the version 4.0.0-beta-6 still facing issue . has it resolved for anyone .
@tarun04sharma do not specify the selenium dependencies - let Serenity pick the versions it needs.
Hello i used a custom driver and it works fine for me,
In the serenity.conf i changed the webdriver like this to use a custom Class as a driver:
webdriver {
driver = "provided"
provided.type = "mydriver"
provided.mydriver = "myPackage.LocalDriver"
thucydides.driver.capabilities = "mydriver"
}
And this an Example of my LocalDriver:
package myPackage
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import net.thucydides.core.webdriver.DriverSource;
public class LocalDriver implements DriverSource {
@Override
public WebDriver newDriver() {
try {
ChromeOptions options = new ChromeOptions();
System.setProperty("webdriver.chrome.driver", "C:/chromedriver/chromedriver.exe");
options.addArguments("--remote-allow-origins=*");
return new ChromeDriver(options);
} catch (Exception e) {
throw new Error(e);
}
}
@Override
public boolean takesScreenshots() {
return true;
}
}
hope it can help
I have updated my Serenity version to use the latest 4.0.12
. I can run FE tests locally with ChromeDriver with no issues (nice).
In our CI/CD pipeline, I still see errors stating that the ChromeDriver cannot be instatiated/started etc.
Here are the main lines to pay attention to in my stacktrace (in chronological order):
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
...
Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver
WebDriver reported the following message: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>'
See below for more details.
...
Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>'
...
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver process to start.
Build info: version: '4.12.1', revision: '8e34639b11'
System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.184-175.749.amzn2.x86_64', java.version: '17.0.8'
Driver info: driver.version: ChromeDriver
If chrome is running correctly locally but not on your build server, that would be a build server configuration issue, not a Serenity issue.
I have updated my Serenity version to use the latest
4.0.12
. I can run FE tests locally with ChromeDriver with no issues (nice).In our CI/CD pipeline, I still see errors stating that the ChromeDriver cannot be instatiated/started etc.
Here are the main lines to pay attention to in my stacktrace (in chronological order):
net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver ... Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver WebDriver reported the following message: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' See below for more details. ... Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' ... Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver process to start. Build info: version: '4.12.1', revision: '8e34639b11' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.184-175.749.amzn2.x86_64', java.version: '17.0.8' Driver info: driver.version: ChromeDriver
HI Mate,
Could you please share your build.gradle file??
I have updated my Serenity version to use the latest
4.0.12
. I can run FE tests locally with ChromeDriver with no issues (nice). In our CI/CD pipeline, I still see errors stating that the ChromeDriver cannot be instatiated/started etc. Here are the main lines to pay attention to in my stacktrace (in chronological order):net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver ... Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver WebDriver reported the following message: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' See below for more details. ... Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' ... Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver process to start. Build info: version: '4.12.1', revision: '8e34639b11' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.184-175.749.amzn2.x86_64', java.version: '17.0.8' Driver info: driver.version: ChromeDriver
HI Mate,
Could you please share your build.gradle file??
I'm using Maven not Gradle, but I can give you the pom.xml
with some redacted info (leaving all the dependency versions):
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<redacted>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<serenity.version>4.0.12</serenity.version>
<serenity.cucumber.version>4.0.12</serenity.cucumber.version>
<cucumber.version>7.14.0</cucumber.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<sl4j.version>1.7.7</sl4j.version>
<lombok.version>1.18.24</lombok.version>
<sonar.version>3.9.1.2184</sonar.version>
<maven.enforcer.version>3.1.0</maven.enforcer.version>
<!-- Sonar analysis properties (equivalent to sonar-project.properties)-->
<sonar.host.url>http://localhost:9000</sonar.host.url>
<sonar.projectKey><redacted></sonar.projectKey>
<sonar.sources>src/main</sonar.sources>
<sonar.inclusions>**</sonar.inclusions>
<sonar.exclusions></sonar.exclusions>
<sonar.test.inclusions></sonar.test.inclusions>
<sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
<sonar.java.binaries>target</sonar.java.binaries>
</properties>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-webdriver</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-ensure</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-assertions</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-screenplay-rest</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber</artifactId>
<version>${serenity.cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>${sl4j.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.version}</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>bson</artifactId>
<version>3.3.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>io.github.sridharbandi</groupId>
<artifactId>java-a11y</artifactId>
<version>3.0.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.1</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.4.0</version>
</dependency>
</dependencies>
<build>
<testResources>
<testResource>
<directory>src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
<include>**/When*.java</include>
</includes>
<excludes>
<exclude>**/acceptancetests/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
<configuration>
<includes>
<include>**/acceptancetests/*.java</include>
</includes>
<argLine>-Xmx512m</argLine>
<systemPropertyVariables>
<cucumber.filter.tags>${cucumber.filter.tags}</cucumber.filter.tags>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.10.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-single-page-report</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-json-summary-report</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>com.deque</groupId>
<artifactId>axe-selenium</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
<configuration>
<reports>single-page-html,json-summary</reports>
</configuration>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>${maven.enforcer.version}</version>
<executions>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>environment</property>
<message>You must set an 'environment' property</message>
<regex>(dev|staging|alpha|automation|test[1-2]|local)</regex>
<regexMessage>You must choose a valid environment name [check the README documentation]</regexMessage>
</requireProperty>
</rules>
<failFast>true</failFast>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
I have updated my Serenity version to use the latest
4.0.12
. I can run FE tests locally with ChromeDriver with no issues (nice). In our CI/CD pipeline, I still see errors stating that the ChromeDriver cannot be instatiated/started etc. Here are the main lines to pay attention to in my stacktrace (in chronological order):net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver ... Caused by: net.thucydides.core.webdriver.DriverConfigurationError: WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver WebDriver reported the following message: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' See below for more details. ... Caused by: org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. Host info: host: 'docker-build-<someString>, ip: '<an-ip-address>' ... Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver process to start. Build info: version: '4.12.1', revision: '8e34639b11' System info: os.name: 'Linux', os.arch: 'amd64', os.version: '5.10.184-175.749.amzn2.x86_64', java.version: '17.0.8' Driver info: driver.version: ChromeDriver
HI Mate, Could you please share your build.gradle file??
I'm using Maven not Gradle, but I can give you the
pom.xml
with some redacted info (leaving all the dependency versions):<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <redacted> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <serenity.version>4.0.12</serenity.version> <serenity.cucumber.version>4.0.12</serenity.cucumber.version> <cucumber.version>7.14.0</cucumber.version> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <sl4j.version>1.7.7</sl4j.version> <lombok.version>1.18.24</lombok.version> <sonar.version>3.9.1.2184</sonar.version> <maven.enforcer.version>3.1.0</maven.enforcer.version> <!-- Sonar analysis properties (equivalent to sonar-project.properties)--> <sonar.host.url>http://localhost:9000</sonar.host.url> <sonar.projectKey><redacted></sonar.projectKey> <sonar.sources>src/main</sonar.sources> <sonar.inclusions>**</sonar.inclusions> <sonar.exclusions></sonar.exclusions> <sonar.test.inclusions></sonar.test.inclusions> <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding> <sonar.java.binaries>target</sonar.java.binaries> </properties> <dependencies> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-core</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-screenplay</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-screenplay-webdriver</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-ensure</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-assertions</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-screenplay-rest</artifactId> <version>${serenity.version}</version> <exclusions> <exclusion> <groupId>io.cucumber</groupId> <artifactId>cucumber-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-cucumber</artifactId> <version>${serenity.cucumber.version}</version> </dependency> <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-java</artifactId> <version>${cucumber.version}</version> </dependency> <dependency> <groupId>io.cucumber</groupId> <artifactId>cucumber-junit</artifactId> <version>${cucumber.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${sl4j.version}</version> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </dependency> <dependency> <groupId>org.sonarsource.scanner.maven</groupId> <artifactId>sonar-maven-plugin</artifactId> <version>${sonar.version}</version> </dependency> <dependency> <groupId>org.mongodb</groupId> <artifactId>bson</artifactId> <version>3.3.0</version> <scope>compile</scope> </dependency> <dependency> <groupId>com.googlecode.json-simple</groupId> <artifactId>json-simple</artifactId> <version>1.1</version> </dependency> <dependency> <groupId>io.github.sridharbandi</groupId> <artifactId>java-a11y</artifactId> <version>3.0.4</version> </dependency> <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api --> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.9.1</version> </dependency> <dependency> <groupId>io.github.bonigarcia</groupId> <artifactId>webdrivermanager</artifactId> <version>5.4.0</version> </dependency> </dependencies> <build> <testResources> <testResource> <directory>src/test/resources</directory> <filtering>true</filtering> </testResource> </testResources> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M7</version> <configuration> <includes> <include>**/Test*.java</include> <include>**/*Test.java</include> <include>**/*Tests.java</include> <include>**/*TestCase.java</include> <include>**/When*.java</include> </includes> <excludes> <exclude>**/acceptancetests/*.java</exclude> </excludes> </configuration> </plugin> <plugin> <artifactId>maven-failsafe-plugin</artifactId> <version>3.0.0-M7</version> <configuration> <includes> <include>**/acceptancetests/*.java</include> </includes> <argLine>-Xmx512m</argLine> <systemPropertyVariables> <cucumber.filter.tags>${cucumber.filter.tags}</cucumber.filter.tags> </systemPropertyVariables> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.10.1</version> <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> </configuration> </plugin> <plugin> <groupId>net.serenity-bdd.maven.plugins</groupId> <artifactId>serenity-maven-plugin</artifactId> <version>${serenity.version}</version> <dependencies> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-single-page-report</artifactId> <version>${serenity.version}</version> </dependency> <dependency> <groupId>net.serenity-bdd</groupId> <artifactId>serenity-json-summary-report</artifactId> <version>${serenity.version}</version> </dependency> <dependency> <groupId>com.deque</groupId> <artifactId>axe-selenium</artifactId> <version>3.0</version> </dependency> </dependencies> <configuration> <reports>single-page-html,json-summary</reports> </configuration> <executions> <execution> <id>serenity-reports</id> <phase>post-integration-test</phase> <goals> <goal>aggregate</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> <version>${maven.enforcer.version}</version> <executions> <execution> <id>enforce-property</id> <goals> <goal>enforce</goal> </goals> <configuration> <rules> <requireProperty> <property>environment</property> <message>You must set an 'environment' property</message> <regex>(dev|staging|alpha|automation|test[1-2]|local)</regex> <regexMessage>You must choose a valid environment name [check the README documentation]</regexMessage> </requireProperty> </rules> <failFast>true</failFast> </configuration> </execution> </executions> </plugin> </plugins> </build> </project>
thanks mate
If chrome is running correctly locally but not on your build server, that would be a build server configuration issue, not a Serenity issue.
If I am running in Headless mode, do I need to have a Chrome browser installed on my pipeline agent? Or is just having the ChromeDriver enough?
If chrome is running correctly locally but not on your build server, that would be a build server configuration issue, not a Serenity issue.
If I am running in Headless mode, do I need to have a Chrome browser installed on my pipeline agent? Or is just having the ChromeDriver enough?
You definitely need a Chrome browser installed. The chromedriver is just an intermediary relaying the generic WebDriver protocol instructions generated by Selenium to your actual Chrome browser.
Is a the Chrome Browser also auto downloaded by the WebDriverManager package? I know it does it for the WebDriver.
WebDriver was unable to create a new instance of type class org.openqa.selenium.chrome.ChromeDriver
Chrome - Version 116.0.5845.97