How install Selenium Webdriver with Python?

SeleniumAutomation TestingTesting Tools

We can install Selenium webdriver with Python with the following steps.

In Linux or MacOS, Python is installed by default. However, in Windows, we have to download Python from the link https://www.python.org/downloads/.

Click on Download Python <version> button. Once the download is completed, the Python executable file gets saved in our system. Click on this file, and the Python installation landing page gets opened. Then, click on Install Now.

Once the installation is completed, Python gets downloaded in the path −

C:\Users\<User>\AppData\Local\Programs\Python\Python<version>

We have to configure the path of the Python folder along with the Scripts folder (generated within the Python folder) in the Environment variables.

To verify, Python has been installed, run the command: python --version.

To install the Selenium bindings in our system, run the command: pip install selenium. As this is done, a folder called Selenium should get created within the Python folder. To update the existing version of Selenium, run the command: pip install –U selenium.

We should have an editor to write the Selenium scripts in Python.

PyCharm(Community version) can be used. We can download it from the link − https://www.jetbrains.com/pycharm/.

raja
Published on 07-Apr-2021 12:33:31
Advertisements