4

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!

1

1 Answer 1

0

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.................

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.