How to run Selenium using Python on Raspberry Pi

sudo apt-get install chromium-browser
chromium-browser --version
Chromium 78.0.3904.108 Built on Raspbian, running on Raspbian 10
chromedriver --version
sudo wget https://github.com/electron/electron/releases/download/v9.0.2/chromedriver-v9.0.2-linux-armv7l.zip
sudo apt-get install unzipunzip chromedriver-v9.0.2-linux-armv7l.zip
driver = webdriver.Chrome(‘/usr/lib/chromium-browser/chromedriver’)

Headless Raspberry Py?

pip3 install pyvirtualdisplay
from pyvirtualdisplay import Displaydisplay = Display(visible=0, size=(800, 600))display.start()

Sudo?

--no-sandbox
chmod -R 777 /path/to/file

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store