How to navigate a website for testing (acceptance/functional) using python?

It can be done via Splinter,

Here is a sample code,

from splinter import Browser

with Browser() as browser:
# Visit URL
url = ""
browser.fill('q', 'splinter - python acceptance testing for web applications')
# Find and click the 'search' button
button = browser.find_by_name('btnG')
# Interact with elements
if browser.is_text_present(''):
print "Yes, the official website was found!"
print "No, it wasn't found... We need to improve our SEO techniques"


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close