- Step 0: Ensure you have Python installed In Linux or MacOS, Python is installed by default.
If you are using Windows, you will need to download Python from the official download page - https://www.python.org/downloads/
To verify, Python has been installed, run the command: python --version
- Step 1: Setup a virtual environment
python -m venv <path-to-your-virtual-environment>
- Step 2: Install Selenium
pip install –U selenium
- Step 3: Install Browser Drivers
I am using Safari browser which has native support for WebDriver, meaning you don't have to install anything. https://webkit.org/blog/6900/webdriver-support-in-safari-10/
If you wish to use other browsers, you may need to download drivers for those.
For example - for Chrome - download ChromeDriver from https://sites.google.com/chromium.org/driver/. Make sure to download according to your browser version.