Skip to content

Instantly share code, notes, and snippets.

@mamedshahmaliyev
Last active March 18, 2024 08:17
Show Gist options
  • Save mamedshahmaliyev/ce5632d326f8f48cf42f14d484aa93e4 to your computer and use it in GitHub Desktop.
Save mamedshahmaliyev/ce5632d326f8f48cf42f14d484aa93e4 to your computer and use it in GitHub Desktop.
Install selenium with chrome driver in raspbian for raspberry pi 3
apt-get install chromium-chromedriver --yes
apt-get install xvfb --yes
pip install PyVirtualDisplay xvfbwrapper selenium
echo '''
from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(1024, 768))
display.start()
opts = webdriver.ChromeOptions()
opts.add_argument('--no-sandbox')
opts.add_argument('--disable-setuid-sandbox')
browser = webdriver.Chrome(options=opts)
# browser.implicitly_wait(10)
browser.get('https://gist.github.com/')
display.stop()
''' > selenium_test.py
@hobyfrezk
Copy link

how can I define browser as for line 13?

@mamedshahmaliyev
Copy link
Author

mamedshahmaliyev commented Oct 26, 2020

how can I define browser as for line 13?

Thanks for pointing this out, I have updated script:

browser = webdriver.Chrome(options=opts)

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