Jenkins is showing message starting the chromedriver but the chromedriver is not triggered and testcase fails.i dont know why it is happening
Note: the xml created for this code runs successfully on terminal.i think issue is with chromedriver
SELENIUM CODE:
public class cmddd {
@Test
public void f() throws InterruptedException {
System.setProperty("webdriver.chrome.driver", "/home/dev2/Downloads/newchromedriver/chromedriver");
WebDriver m = new ChromeDriver();
m.get("https://www.google.com/");
System.out.println("passed");
}
}
JENKINS OUTPUT:
Building in workspace /home/dev2/eclipse-workspace/seffcon
[seffcon] $ /bin/sh -xe /tmp/jenkins170843147783066328.sh
+ ./cd.sh
[TestNG] Running:
/home/dev2/eclipse-workspace/seffcon/cd.xml
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 20671
Only local connections are allowed.
===============================================
Suite
Total tests run: 1, Failures: 1, Skips: 0
===============================================
Build step 'Execute shell' marked build as failure
Finished: FAILURE
This error message...
Starting ChromeDriver 2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7) on port 20671
Only local connections are allowed.
.
Build step 'Execute shell' marked build as failure
Finished: FAILURE
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser ie Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Supports Chrome v66-68
@Test
. driver.quit()
within tearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully. Check your chromedriver version and chromebrowser version. I had noticed this behaviour when there is a version mismatch.
You can refer this link http://chromedriver.chromium.org/downloads
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.