Skip to content

Instantly share code, notes, and snippets.

@mauro-balades
Forked from siumhossain/readme.md
Created May 3, 2023 17:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mauro-balades/8b4cd01517a7e1b0e236e4565f24caa7 to your computer and use it in GitHub Desktop.
Save mauro-balades/8b4cd01517a7e1b0e236e4565f24caa7 to your computer and use it in GitHub Desktop.
How to install selenium chrome web driver in linux

Download chrome webdriver from

Click here for download

Make sure driver version match your chrome browser version

Open folder where chrome driver downloaded and open terminal & run one by one

sudo chmod +x chromedriver
sudo mv chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
chromedriver --version

If output looks like something 👇🏻

ChromeDriver 91.0.4472.19 (1bf021f248676a0b2ab3ee0561d83a59e424c23e-refs/branch-heads/4472@{#288})

Its ready to go

Open any py file where you write program

from selenium import webdriver

Please make sure you install selenium

pip3 install selenium
driver_location = '/usr/bin/chromedriver'
binary_location = '/usr/bin/google-chrome'

options = webdriver.ChromeOptions()
options.binary_location = binary_location

driver = webdriver.Chrome(executable_path=driver_location,options=options)
driver.get("https://www.youtube.com/watch?v=67h3IT2lm40")

Run this py file

🌟 Voila its work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment