Skip to content

Instantly share code, notes, and snippets.

@dawsbot
Created July 26, 2015 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dawsbot/9a86706a83e2216617cf to your computer and use it in GitHub Desktop.
Save dawsbot/9a86706a83e2216617cf to your computer and use it in GitHub Desktop.
from selenium import webdriver
driver = webdriver.Chrome()
driver.get('http://google.com')
#Get I"m feeling lucky text
element = driver.find_element_by_xpath('//*[@id="gbqfbb"]')
print element.get_attribute('value')
driver.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment