I'm using Selenium in my Groovy application as a Maven dependency. Now I'm looking for a way to log the used Selenium Version to the console. I tried this:
BuildInfo info = new BuildInfo();
def infoString = info.toString();
But infoString
only contains:
"Build info: version: 'unknown', revision: 'unknown', time: 'unknown'".
I also tried reading the version from the classpath of the project and though this works in a Java project in a groovy project the classpath no longer contains the used selenium version.
In a java project, the infoString
also contains the used version, revision etc.
Any help would be very much appreciated!
-
2Is this what you looking for? - stackoverflow.com/questions/8574949/…Rao– Rao2016年01月06日 13:42:46 +00:00Commented Jan 6, 2016 at 13:42
1 Answer 1
I am not sure on how to get the Selenium version through code. I dont think there are any methods to do so.
But, the version is clearly mentioned in the CHANGELOG file that comes along with your Selenium installation.
You can read the version from this file. Below is the content of the log file:
v2.43.0 ======= WebDriver:
- Updating Native events to support Firefox 24, 31 and 32 * Add note on stale element checks and a WebElement.................
Explore related questions
See similar questions with these tags.