Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find chrome driver version in use for a node on a Selenium grid

Is there a way to check the chrome driver version in use on a particular node remotely?

I know running chromedriver.exe -v directly on the node will report the driver version. But is there any way to query this through the selenium grid api?

I've looked at the useful information here but I can't see a way to do it: https://github.com/nicegraham/selenium-grid2-api

Or ideally I'd like to see this displayed on configuration tab of the selenium grid console for each node.

Maybe there's a way to display this as an extra property I add to the configuration by capturing the output of running capture the output of chromedriver.exe -v prior to connecting the node to the grid?

like image 355
Chris R Avatar asked Feb 24 '17 10:02

Chris R


People also ask

Where does Selenium install Chrome drivers?

Below are the steps to follow while configuring the chrome setup for Selenium. #1) Check the version of the chrome. #3) Download the chromedriver.exe file for the respective OS and copy that .exe file into your local. #4) The path of the chromedriver (C:\webdriver\chromedriver.exe) will be used in our program.

What is the current Chromedriver version?

ChromeDriver 79.0.3945.36 For more details, please see the release notes.

How do I know if Chromedriver is compatible?

ChromeDriver is only compatible with Chrome version 12.0. 712.0 or newer. If you need to test an older version of Chrome, use Selenium RC and a Selenium-backed WebDriver instance.


1 Answers

If you have a configuration file for your node you can add the currently running/deployed chromedriver version to that and than it will be shown in the Configuration tab.
I added the chromedriver version by hand, but you can easily add this during deployment of the node.

Configuration file with capabilities

This way it will be displayed in the capabilities section of the Configuration tab in your /grid/console.

Capabilities with chromedriver version

PS: If you need the Chromedriver version during runtime of your code you can get it with driver.getCapabilities().getCapability("chrome") and than parse the chromedriverVersion with a RegEx.

like image 133
Robert G Avatar answered Dec 05 '22 00:12

Robert G