

I’ve created a python script that you can use to make sure everything is working correctly. Options.add_argument("-disable-dev-shm-usage")ĭriver = webdriver.Chrome(options=options) Options.add_argument("-disable-infobars") Options.add_argument("enable-automation") If you still need to setup pip3 on your EC2 instance, you can visit this post here.Īdding Arguments To Your Selenium ChromeDriverįrom my initial testing, I would recommend adding all of the following arguments when initialising selenium in a production environment: from import Options Now install selenium for python 3x with the following command: pip3 install selenium -user Its’ worth double checking that your chromedriver and google chrome versions are the same version.


Google-chrome -version & which google-chrome Sudo mv /usr/bin/google-chrome-stable /usr/bin/google-chrome Then you’ll need to download and install the Google Chrome binary for your EC2 instance.

Sudo mv chromedriver /usr/bin/chromedriver You will need to install ChromeDriver which allows you programmatic access to google chrome via the Webdriver API protocol. In this guide you’ll learn how to easily deploy and test a fully functional selenium python environment. If you’re looking to use selenium and headless browsers on amazon web services (AWS) its essential that you install the relevant versions of selenium, ChromeDriver and Google Chrome to your EC2 instance.
