Skip to content

Instantly share code, notes, and snippets.

@thadclay
Created November 23, 2016 02:53
Show Gist options
  • Save thadclay/678150b660cb406d823714bb675955e8 to your computer and use it in GitHub Desktop.
Save thadclay/678150b660cb406d823714bb675955e8 to your computer and use it in GitHub Desktop.
Test if chromedriver works
import time
from selenium import webdriver
driver = webdriver.Chrome('./chromedriver') # Optional argument, if not specified will search path.
driver.get('http://www.google.com/xhtml');
time.sleep(5) # Let the user actually see something!
search_box = driver.find_element_by_name('q')
search_box.send_keys('ChromeDriver')
search_box.submit()
time.sleep(5) # Let the user actually see something!
driver.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment