To install the Selenium library in Python, follow these steps:
Ensure Python is Installed: First, ensure you have Python installed on your Windows machine. If not, download and install the latest version from the official Python website: https://www.python.org/downloads/
Open Python IDLE: Access the Python IDLE (Integrated Development and Learning Environment), the default editor with Python.
Install Selenium: In the Python IDLE shell, enter the following command to install the latest version of Selenium:
python -m pip install -U selenium
Verify Installation: After installation, you can verify the version of Selenium installed by executing:
python -c 'import selenium; print(selenium.__version__)'
Additionally, you can view a list of all installed Python packages and their versions using:
pip list
This list will include Selenium along with its version number.
By following these steps, you'll successfully install the Selenium library for Python on your Windows machine.