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, ∼2621🔥, 0💬
Popular Posts:
How to generate IP Addresses? To help you to obtain some IP addresses for testing purpose, FYIcenter...
Where to find online test tools? FYIcenter.com has prepared a number of online test tools: Data Look...
How to generate user birthday dates? Test user birthday dates are frequently needed in testing appli...
How to find out my browser request headers? To help you to see your browser request headers, FYIcent...
How to turn on Chrome WebDriver logging with Selenium Python API? If you want to turn on logging on ...