https://www.python.org/downloads/ – Download Python
Install Selenium
$ pip install selenium
Chrome Driver for Selenium
https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver – download Chrome Driver
Place Chrome Driver in directory: C:\Program Files (x86)\Google\chromedriver.exe
Google-test.py
#IMPORT
from selenium import webdriver
driver = webdriver.Chrome("C:\\Program Files (X86)\\Google\\chromedriver.exe")
from time import sleep
#NAVIGATE
driver.get("https://www.google.com/")
driver.maximize_window()
sleep(2)
#FILL OUT FIELDS
driver.find_element_by_id("lst-ib").send_keys("testing with python and selenium")
#CLICK SUBMIT BUTTON
driver.find_element_by_name("btnK").click()
driver.get_screenshot_as_file("search.png")
sleep(5)
#END PROGRAM
driver.close()
Tutorial
Here’s a good tutorial I watched to get started: