Created
October 24, 2019 04:48
-
-
Save abhianair/8e7dbcf962affe368c46f2b8d4c13a8e to your computer and use it in GitHub Desktop.
Selenium-Python-Chromedriver-Windows webpage automation initial setup
This file contains hidden or 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
#chrome driver installation | |
link: https://chromedriver.chromium.org/ | |
#download the chromedriver respective to the version of your chrome webbrowser | |
#unzip the downloaded file and move "chromedriver.exe" to a folder or a working directory | |
#run the "chromedriver.exe" before the automated script runs. | |
#selenium module installation using pip | |
pip install selenium | |
#modules needed to imported in the script | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
#driver initialisation in python script | |
driver = webdriver.Chrome('[path-to-chromedriver]/chromedriver') | |
#if chromedriver present in working directory | |
driver = webdriver.Chrome('chromedriver') | |
#userful tutorials | |
https://www.browserstack.com/guide/python-selenium-to-run-web-automation-test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment