'Selenium testing failed using remote chromedriver in jenkins slave
I'm trying to run selenium tests using remote chrome driver using one o the jenkins slave and it is failing with below error message
chrome, driver: chrome, goog:chromeOptions: {args: [--headless], extensions: []}, handlesAlerts: true, loggingPrefs: org.openqa.selenium.logging..., timeouts.fluentwait: 300, timeouts.implicitlywait: 7000, wait.for.timeout: 5000}
18:45:04 Starting ChromeDriver 99.0.4844.51 (d537ec02474b5afe23684e7963d538896c63ac77-refs/branch-heads/4844@{#875}) on port 2931
18:45:04 Only local connections are allowed.
18:45:04 Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
18:45:04 ChromeDriver was started successfully.
18:45:04 [main] INFO - STEP ERROR: net.thucydides.core.webdriver.DriverConfigurationError: Could not instantiate class org.openqa.selenium.chrome.ChromeDriver
previously it was failing due to "cannot assign ip address and i have fixed it by allowing ipv6". Now it is failing with above error messages.
My questions:
- Every time chrome driver is trying to use a different port i.e. Do we need to those ports whitelisted in Firewall? If so do we have any option to restrict this in a specific port or port range (Note - i'm using remote chrome driver, if any plugins options are there please recommend that as well)
- I saw in some of the answers related to this issue - slave should be added using java webstart instead of ssh. Since my slaves are added using ssh whether that is causing the issue?
Solution 1:[1]
I found chrome browser was not installed in jenkins slave machine.Once i have installed that with exact version of chrome driver,it is working fine
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JPNagarajan |