Skip to content

Instantly share code, notes, and snippets.

@douglasmiranda
Created June 6, 2012 06:27
Show Gist options
  • Save douglasmiranda/2880266 to your computer and use it in GitHub Desktop.
Save douglasmiranda/2880266 to your computer and use it in GitHub Desktop.
Tutorial Splinter. Fixing the current tutorial, which is failing
from splinter.browser import Browser
browser = Browser('chrome')
browser.visit('http://google.com')
browser.fill('q', 'splinter - python acceptance testing for web applications')
browser.find_by_name('btnG').first.click()
if browser.is_text_present('splinter.cobrateam.info'):
print "Yes, the official website was found!"
else:
print "No, it wasn't found... We need to improve our SEO techniques"
browser.quit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment