Fetching contributors…
Cannot retrieve contributors at this time
123 lines (90 sloc) 3.63 KB


Splinter is an open source tool for testing web applications using Python. It lets you automate browser actions, such as visiting URLs and interacting with their items.

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")

Note: if you don't provide any driver to Browser function, firefox will be used.


  • simple api
  • multi webdrivers (chrome webdriver, firefox webdriver, phantomjs webdriver, zopetestbrowser, remote webdriver)
  • css and xpath selectors
  • support to iframe and alert
  • execute javascript
  • works with ajax and async javascript

:doc:`what's new in splinter? </news>`

Getting started

Basic browsing and interactions

JavaScript support

Walking on...


Browser based drivers

The following drivers open a browser to run your actions:

Headless drivers

The following drivers don't open a browser to run your actions (but has its own dependencies, check the specific docs for each driver):

Remote driver

The remote driver uses Selenium Remote to control a web browser on a remote machine.

Get in touch and contribute