Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In Java, you can get the version of Selenium by using the following code:

String version = org.openqa.selenium.remote.RemoteWebDriver.getVersion().toString();
System.out.println("Selenium Version: " + version);

In Python, you can get the version of Selenium by using the following code:

from selenium import __version__

print("Selenium Version:", __version__)

In C#, you can get the version of Selenium by using the following code:

using OpenQA.Selenium;

string version = ((RemoteWebDriver)driver).Capabilities.GetCapability("version").ToString();
Console.WriteLine("Selenium Version: " + version);