Installation of Selenium in VS Code Using Ubuntu Terminal 22.04
Step 1: Installing Google Chrome
(• Commands)
1.1 First of all, download the latest Gooogle Chrome Debian package on your system.
• wget -nc https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
1.2 Now, execute the following commands to install Google Chrome from the locally downloaded file.
• sudo apt update
• sudo apt install -f ./google-chrome-stable_current_amd64.deb
--> Press ‘y’ for all the confirmations asked by the installer.
Step 2: Installing Selenium and Webdriver for Python
We will use a virtual environment for running Python scripts. Follow the below steps to create
Python virtual environment and install the required python modules.
1.Create a directory to store Python scripts. Then switch to the newly-created directory.
• mkdir tests && cd tests
2. Set up the Python virtual environment and activate it
• python3 -m venv venv
• source venv/bin/activate
3. Now use PIP to install the selenium and webdriver-manager Python modules under the virtual environment.
• install selenium webdriver-manager
4. Change directory and create a file
• cd
• code . (VS code opens create a file with name) (Space is must between code and .)
• cd tests (Tests is sample file name enter your file name that is created in vs code)
• code . (after it get into the tests folder)
5. After the installation opening and running the vs code and running the program should be done in ubuntu 22.04
5.1 Code . : Is to open vs code
5.2 Python filename.py : is used to run the program