I have a brand-new out of the box Raspberry Pi 4 that I'd like to run python selenium on. However, I don't have the path to use for this command: any tips?
driver = webdriver.Chrome("path-to-chromiumdriver")
I am also happy to run it with Firefox if someone has the path for that!
Thanks, /yga
Aha - looks like https://ivanderevianko.com/2020/01/selenium-chromedriver-for-raspberrypi has the answer!
sudo apt-get install chromium-chromedriver
And then in the python code:
from pyvirtualdisplay import Display
display = Display(visible=0, size=(1600, 1200))
display.start()
driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver')
(I wanted to run a headless version; hence the pyvirtualdisplay)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With