Knowledgebase

How to Check Selenium Version in Windows Command Prompt?

When you are working with Selenium for test automation, knowing the exact Selenium version installed on your system is more important than it looks. 

Maybe a test is failing after an update, maybe a new feature is not working as expected, or maybe you’re just trying to match your Selenium version with a compatible browser driver. Whatever the reason, checking the Selenium version quickly can save you a lot of troubleshooting time.

The good news is, you don’t need any special tools or complex steps. If Selenium is installed on your system, you can check its version directly using the Command Prompt. 

In this article, we will walk through simple, clear methods to check the Selenium version and explain what each command actually does so you know exactly what’s happening behind the scenes.

Before You Begin

The command you use to check the Selenium version depends on how Selenium is installed and which language you’re using. Selenium is commonly used with Java or Python, so we will cover both scenarios. 

You need to make sure:

  •  Command Prompt is open on your system.
  •  Java or Python is already installed (depending on your Selenium setup).
  •  Selenium is available in your project or system environment.

Methods to Check Selenium Version in Windows CMD

This section explains different ways to find the installed Selenium version using Windows Command Prompt. You can follow the method based on whether you are using Selenium with Java or Python.

Method 1: Check Selenium Version Using Java (Command Prompt)

This method is helpful if you are using Selenium with Java and Selenium is available as a standalone JAR file.

Step-by-step explanation:

  •  Open Command Prompt.
  •  Use the cd command to move to the folder where the Selenium JAR file is stored.
Copied!
cd C:\selenium

Here, cd stands for change directory. It tells the Command Prompt to switch to the folder where Selenium is located.

➔ Now run the following command:

Copied!
java -jar selenium-server-standalone.jar –version

What this command means:

  •  java tells the system to use Java
  •  -jar means you want to run a JAR file
  •  selenium-server-standalone.jar is the Selenium file you’re executing
  •  –version is a flag that asks Selenium to display its version number

Once you press Enter, the Selenium version will be displayed in the output.

Copied!
Selenium Server version: 3.141.59, revision: e82be7d358

Method 2: Check Selenium Version Using Python (Command Prompt)

This method is best if you are using Selenium with Python and have installed it using pip.

Step-by-step explanation:

  •  Open Command Prompt.
  •  Type the following command and press Enter:
Copied!
pip show selenium

What this command means:

  •  pip is Python’s package manager
  •  show asks pip to display details about a package
  •  selenium is the package name

After running the command, you will see information such as the version number, installation location, and dependencies. Look for the line that says “Version.”

How Output looks like:

Copied!
Name: selenium
Version: 4.17.2
Summary: Python bindings for Selenium
Home-page: https://www.selenium.dev/
Author: Selenium Committers
Author-email: selenium-developers@googlegroups.com
License: Apache 2.0
Location: C:\Users\Username\AppData\Local\Programs\Python\Python311\Lib\site-packages
Requires: certifi, trio, trio-websocket, urllib3
Required-by:

Method 3: Check Selenium Version Using Python Directly

This method is helpful when you want to confirm the Selenium version from inside Python itself, especially if you’re using virtual environments.

Step-by-step explanation:

  •  Open Command Prompt.
  •  Start Python with the command below:
Copied!
python

This launches the Python interpreter.

➔ Now, run the following commands to check the version.

Copied!
import selenium
print(selenium.__version__)

What this does:

  •  import selenium loads the Selenium package
  •  selenium.__version__ fetches the installed version
  •  print() displays the version on the screen

Once done, you can exit Python by typing exit().

Common Issues You May Face

If you see errors like command not found or module not found, it usually means:

  •  Selenium is not installed.
  •  Python or Java is not added to the system PATH
  •  You’re using a different virtual environment.

In such cases, make sure Selenium is installed correctly and that you are using the right environment.

Conclusion

Checking the Selenium version in Command Prompt is a simple yet very useful task, especially when working on automation projects or debugging compatibility issues. Whether you are using Java or Python, a single command can quickly tell you which Selenium version is installed on your system.

Now that you know multiple ways to check it and understand what each command does, you can confidently verify your Selenium setup whenever you need to. This small habit can save hours of confusion and help keep your automation environment clean and predictable.