Collections:
Use Chrome WebDriver with Google ChromeDriver
How to use Chrome WebDriver with Google ChromeDriver WebDriver server?
✍: FYIcenter.com
If you are using the Chrome WebDriver with the Selenium Java API, and you want to override the default Google ChromeDriver, you need to set the webdriver.chrome.driver system property to the path to the Google ChromeDriver driver as shown below.
1. Make sure that you have Google ChromeDriver WebDriver Server installed:
C:\fyicenter>dir \fyicenter\selenium\chromedriver 8,393,728 chromedriver.exe
2. Set the webdriver.chrome.driver system property to the ChromeDriver server program path and run the test again.
C:\fyicenter> java -classpath \ .;\fyicenter\selenium\java\client-combined-3.141.59.jar;\ .;\fyicenter\selenium\java\client-combined-3.141.59.jar;\ \fyicenter\selenium\java\libs\guava-25.0-jre.jar;\ \fyicenter\selenium\java\libs\okhttp-3.11.0.jar;\ \fyicenter\selenium\java\libs\okio-1.14.0.jar;\ \fyicenter\selenium\java\libs\commons-exec-1.3.jar \ -Dwebdriver.chrome.driver=\fyicenter\selenium\chromedriver\chromedriver.exe \ ChromeTest Starting ChromeDriver 76.0.3809.12 (...-refs/branch-heads/3809@{#83}) on port 48877 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: session not created: This version of ChromeDriver only supports Chrome version 76 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '12.0.1' Driver info: driver.version: ChromeDriver remote stacktrace: Backtrace: Ordinal0 [0x014E7723+1472291] ...
As you can see, we are getting a different error: "This version of ChromeDriver only supports Chrome version 76". So we need update Google Chrome to version 76 to match ChromeDriver version. See next tutorial on how to fix it.
⇒ Match Google ChromeDriver version with Chrome
⇐ Chrome WebDriver Test with Selenium Java API
2020-02-07, 1714🔥, 0💬
Popular Posts:
How to generate currency test values? Currency test values are frequently needed in testing date and...
How to convert IPv4 to IPv6 addresses? In order to help your programming or testing tasks, FYIcenter...
How to Pass Windows Environment Variable to JMeter? I want to use Windows temporary folder environme...
How to generate MAC addresses? To help you to obtain some MAC addresses for testing purpose, FYIcent...
How to generate IP Addresses? To help you to obtain some IP addresses for testing purpose, FYIcenter...