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

Chris R picture Chris R · Feb 24, 2017 · Viewed 30.2k times · Source

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?

Answer

Robert G picture Robert G · Feb 24, 2017

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.