Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 962 Bytes

README.md

File metadata and controls

43 lines (28 loc) · 962 Bytes

Install Selenium & Chrome in WSL Ubuntu

This script can be used to install Chrome, Chromedriver, and Selenium in Ubuntu on Windows Subsystem for Linux (WSL2).

Detailed step by step explanation is available in this article on how to Run Selenium and Chrome/Chromium on WSL2 using Python and Selenium webdriver

Using the repository

Clone the repository

git clone https://github.com/rehanhaider/selenium-wsl2-ubuntu.git selenium && cd selenium

Update system packages

sudo apt update && sudo apt upgrade -y

Install Chrome & Chromedriver

./install-selenium.sh

A virtual environment is automatically created and recommended.

source .env/bin/activate

Install packages through requirements.txt

pip install -r requirements.txt

Run a python program (I can't believe I have to mention this)

python3 run_selenium.py