Last active
March 18, 2024 08:17
-
-
Save mamedshahmaliyev/ce5632d326f8f48cf42f14d484aa93e4 to your computer and use it in GitHub Desktop.
Install selenium with chrome driver in raspbian for raspberry pi 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
how can I define
browser
as for line 13?