selenium 4.37.0


pip install selenium

  Latest version

Released: Oct 17, 2025

Project Links

Meta
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Operating System
  • POSIX
  • Microsoft :: Windows
  • MacOS :: MacOS X

Topic
  • Software Development :: Testing
  • Software Development :: Libraries

Programming Language
  • Python
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Introduction

Python language bindings for Selenium WebDriver.

The selenium package is used to automate web browser interaction from Python.

Home:

https://selenium.dev

GitHub:

https://github.com/SeleniumHQ/Selenium

PyPI:

https://pypi.org/project/selenium

IRC/Slack:

https://www.selenium.dev/support/#ChatRoom

Docs:

https://www.selenium.dev/selenium/docs/api/py

API Reference:

https://www.selenium.dev/selenium/docs/api/py/api.html

Updated documentation published with each commit is available at: readthedocs.io


Supported Python Versions

  • Python 3.10+

Supported Browsers

Several browsers are supported, as well as the Remote protocol:

  • Chrome

  • Edge

  • Firefox

  • Safari

  • WebKitGTK

  • WPEWebKit

Installing

Install or upgrade the Python bindings with pip <https://pip.pypa.io/>.

Latest official release:

pip install -U selenium

Nightly development release:

pip install -U --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ selenium

Note: you should consider using a virtual environment to create an isolated Python environment for installation.

Drivers

Selenium requires a driver to interface with the chosen browser (chromedriver, edgedriver, geckodriver, etc).

In older versions of Selenium, it was necessary to install and manage these drivers yourself. You had to make sure the driver executable was available on your system PATH, or specified explicitly in code. Modern versions of Selenium handle browser and driver installation for you with Selenium Manager. You generally don’t have to worry about driver installation or configuration now that it’s done for you when you instantiate a WebDriver. Selenium Manager works with most supported platforms and browsers. If it doesn’t meet your needs, you can still install and specify browsers and drivers yourself.

Links to some of the more popular browser drivers:

Chrome:

https://developer.chrome.com/docs/chromedriver

Edge:

https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver

Firefox:

https://github.com/mozilla/geckodriver

Safari:

https://webkit.org/blog/6900/webdriver-support-in-safari-10

Example 0:

  • launch a new Chrome browser

  • load a web page

  • close the browser

from selenium import webdriver


driver = webdriver.Chrome()
driver.get('https://selenium.dev/')
driver.quit()

Example 1:

  • launch a new Chrome browser

  • load the Selenium documentation page

  • find the “Webdriver” link

  • click the “WebDriver” link

  • close the browser

from selenium import webdriver
from selenium.webdriver.common.by import By


driver = webdriver.Chrome()

driver.get('https://selenium.dev/documentation')
assert 'Selenium' in driver.title

elem = driver.find_element(By.ID, 'm-documentationwebdriver')
elem.click()
assert 'WebDriver' in driver.title

driver.quit()

Example 2:

Selenium WebDriver is often used as a basis for testing web applications. Here is a simple example using Python’s standard unittest library:

import unittest
from selenium import webdriver


class GoogleTestCase(unittest.TestCase):

    def setUp(self):
        self.driver = webdriver.Firefox()
        self.addCleanup(self.driver.quit)

    def test_page_title(self):
        self.driver.get('https://www.google.com')
        self.assertIn('Google', self.driver.title)

if __name__ == '__main__':
    unittest.main(verbosity=2)

Selenium Grid (optional)

For local Selenium scripts, the Java server is not needed.

To use Selenium remotely, you need to also run a Selenium Grid. For information on running Selenium Grid: https://www.selenium.dev/documentation/grid/getting_started/

To use Remote WebDriver see: https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/?tab=python

Use The Source Luke!

View source code online:

Official:

https://github.com/SeleniumHQ/selenium/tree/trunk/py

Contributing

  • Fork the selenium repo

  • Clone your fork locally

  • Create a branch for your work
    • git checkout -b my-cool-branch-name

  • Create a virtual environment and install tox
    • python -m venv venv && source venv/bin/activate && pip install tox

  • Make your changes

  • Run the linter/formatter
    • tox -e linting

  • If tox exits 0, commit and push. Otherwise, fix the newly introduced style violations

  • Submit a Pull Request

4.37.0 Oct 17, 2025
4.36.0 Oct 02, 2025
4.35.0 Aug 12, 2025
4.34.2 Jul 08, 2025
4.34.1 Jul 07, 2025
4.34.0 Jun 29, 2025
4.33.0 May 23, 2025
4.32.0 May 02, 2025
4.31.0 Apr 05, 2025
4.30.0 Mar 21, 2025
4.29.0 Feb 20, 2025
4.28.1 Jan 23, 2025
4.28.0 Jan 20, 2025
4.27.1 Nov 26, 2024
4.27.0 Nov 25, 2024
4.26.1 Oct 31, 2024
4.26.0 Oct 30, 2024
4.25.0 Sep 20, 2024
4.24.0 Aug 28, 2024
4.23.1 Jul 24, 2024
4.23.0 Jul 19, 2024
4.22.0 Jun 20, 2024
4.21.0 May 16, 2024
4.20.0 Apr 24, 2024
4.19.0 Mar 27, 2024
4.18.1 Feb 20, 2024
4.18.0 Feb 19, 2024
4.17.2 Jan 23, 2024
4.17.1 Jan 23, 2024
4.17.0 Jan 23, 2024
4.16.0 Dec 06, 2023
4.15.2 Nov 03, 2023
4.15.1 Nov 02, 2023
4.15.0 Nov 01, 2023
4.14.0 Oct 10, 2023
4.13.0 Sep 25, 2023
4.12.0 Aug 31, 2023
4.11.2 Aug 01, 2023
4.11.1 Aug 01, 2023
4.11.0 Jul 31, 2023
4.10.0 Jun 07, 2023
4.9.1 May 08, 2023
4.9.0 Apr 21, 2023
4.8.3 Mar 24, 2023
4.8.2 Feb 17, 2023
4.8.1 Feb 17, 2023
4.8.0 Jan 23, 2023
4.7.2 Dec 02, 2022
4.7.1 Dec 02, 2022
4.7.0 Dec 01, 2022
4.6.1 Nov 25, 2022
4.6.0 Nov 04, 2022
4.5.0 Sep 28, 2022
4.4.3 Aug 18, 2022
4.4.2 Aug 17, 2022
4.4.1 Aug 17, 2022
4.4.0 Aug 09, 2022
4.3.0 Jun 23, 2022
4.2.0 May 27, 2022
4.1.5 May 05, 2022
4.1.4 May 05, 2022
4.1.3 Mar 09, 2022
4.1.2 Feb 24, 2022
4.1.1 Feb 23, 2022
4.1.0 Nov 22, 2021
4.0.0 Oct 13, 2021
4.0.0rc3 Oct 08, 2021
4.0.0rc2 Sep 30, 2021
4.0.0rc1 Sep 02, 2021
4.0.0b4 Jun 07, 2021
4.0.0b3 Apr 14, 2021
4.0.0b2.post1 Mar 17, 2021
4.0.0b2 Mar 16, 2021
4.0.0b1 Feb 15, 2021
4.0.0a7 Nov 10, 2020
4.0.0a6.post2 Jun 05, 2020
4.0.0a6.post1 May 28, 2020
4.0.0a6 May 28, 2020
4.0.0a5 Mar 18, 2020
4.0.0a3 Oct 01, 2019
4.0.0a1 Apr 18, 2019
3.141.0 Nov 01, 2018
3.14.1 Sep 20, 2018
3.14.0 Aug 02, 2018
3.13.0 Jun 25, 2018
3.12.0 May 08, 2018
3.11.0 Mar 12, 2018
3.10.0 Mar 05, 2018
3.9.0 Feb 05, 2018
3.8.1 Jan 04, 2018
3.8.0 Nov 30, 2017
3.7.0 Nov 02, 2017
3.6.0 Sep 25, 2017
3.5.0 Aug 10, 2017
3.4.3 May 30, 2017
3.4.2 May 18, 2017
3.4.1 Apr 27, 2017
3.4.0 Apr 21, 2017
3.3.3 Apr 04, 2017
3.3.2 Apr 04, 2017
3.3.1 Mar 13, 2017
3.3.0 Mar 08, 2017
3.0.2 Nov 28, 2016
3.0.1 Oct 14, 2016
3.0.0 Oct 13, 2016
3.0.0b3 Sep 14, 2016
3.0.0b2 Aug 02, 2016
3.0.0b1 Jul 29, 2016
2.53.6 Jun 28, 2016
2.53.5 Jun 10, 2016
2.53.4 Jun 08, 2016
2.53.3 Jun 08, 2016
2.53.2 Apr 19, 2016
2.53.1 Mar 16, 2016
2.53.0 Mar 15, 2016
2.52.0 Feb 11, 2016
2.51.1 Feb 05, 2016
2.51.0 Feb 05, 2016
2.50.1 Feb 01, 2016
2.50.0 Jan 27, 2016
2.49.2 Jan 19, 2016
2.49.1 Jan 18, 2016
2.49.0 Jan 13, 2016
2.48.0 Oct 07, 2015
2.47.3 Sep 15, 2015
2.47.2 Sep 15, 2015
2.47.1 Aug 03, 2015
2.47.0 Jul 29, 2015
2.46.1 Jul 20, 2015
2.46.0 Jun 04, 2015
2.45.0 Feb 27, 2015
2.44.0 Oct 23, 2014
2.43.0 Sep 09, 2014
2.42.1 May 27, 2014
2.42.0 May 22, 2014
2.41.0 Mar 28, 2014
2.40.0 Feb 19, 2014
2.39.0 Dec 16, 2013
2.38.4 Dec 12, 2013
2.38.3 Dec 09, 2013
2.38.2 Dec 09, 2013
2.38.1 Dec 05, 2013
2.38.0 Dec 05, 2013
2.37.2 Oct 22, 2013
2.37.1 Oct 21, 2013
2.37.0 Oct 18, 2013
2.36.0 Oct 17, 2013
2.35.0 Aug 13, 2013
2.34.0 Aug 06, 2013
2.33.0 May 22, 2013
2.32.0 Apr 10, 2013
2.31.0 Feb 27, 2013
2.30.0 Feb 19, 2013
2.29.0 Jan 17, 2013
2.28.0 Dec 11, 2012
2.27.0 Dec 05, 2012
2.26.0 Nov 01, 2012
2.25.0 Jul 18, 2012
2.24.0 Jun 19, 2012
2.23.0 Jun 07, 2012
2.22.1 May 29, 2012
2.22.0 May 29, 2012
2.21.3 May 08, 2012
2.21.2 Apr 16, 2012
2.21.1 Apr 11, 2012
2.21.0 Apr 11, 2012
2.20.0 Feb 27, 2012
2.19.1 Feb 08, 2012
2.19.0 Feb 08, 2012
2.18.1 Jan 27, 2012
2.18.0 Jan 27, 2012
2.17.0 Jan 16, 2012
2.16.0 Jan 04, 2012
2.15.0 Dec 08, 2011
2.14.0 Nov 29, 2011
2.13.1 Nov 18, 2011
2.13.0 Nov 18, 2011
2.12.1 Nov 10, 2011
2.12.0 Nov 10, 2011
2.11.1 Oct 28, 2011
2.11.0 Oct 28, 2011
2.10.0 Oct 28, 2011
2.9.0 Oct 21, 2011
2.8.1 Oct 06, 2011
2.8.0 Oct 06, 2011
2.7.0 Sep 26, 2011
2.6.0 Sep 13, 2011
2.5.0 Aug 23, 2011
2.4.0 Aug 11, 2011
2.3.0 Aug 01, 2011
2.2.0 Jul 26, 2011
2.1.0 Jul 18, 2011
2.0.1 Jul 08, 2011
2.0 Jun 08, 2010
2.0rc3 Jun 20, 2011
2.0rc2 Jun 02, 2011
2.0rc1 Jun 01, 2011
2.0b4.dev0 Apr 14, 2011
2.0b3 Mar 21, 2011
2.0b3.dev0 Mar 21, 2011
2.0b2 Feb 14, 2011
2.0a5 Aug 13, 2010
2.0.dev9429
2.0.dev9341
2.0.dev9340
2.0.dev9338
2.0.dev9310
2.0.dev9307
2.0.dev9306
2.0.dev9284
2.0.dev9231
2.0.dev9212
2.0.dev9138
2.0.dev6 Feb 14, 2011
2.0.dev5 Feb 14, 2011
2.0.dev4 Feb 14, 2011
2.0.dev3 Feb 14, 2011
2.0.dev2 Feb 14, 2011
2.0.dev1 Feb 14, 2011
2.0.dev0
1.0.3 May 26, 2010
1.0.1 Jun 17, 2009
0.9.2 Apr 25, 2008
4.0.0a6.macosx May 28, 2020

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
urllib3[socks] (<3.0,>=2.5.0)
trio (<1.0,>=0.31.0)
trio-websocket (<1.0,>=0.12.2)
certifi (>=2025.10.5)
typing_extensions (<5.0,>=4.15.0)
websocket-client (<2.0,>=1.8.0)