Skip to content

cobrateam/splinter

master
Switch branches/tags
Code

Latest commit

* github/workflows: fix selenium-server flakiness

The previous code wasn't doing the right thing: it started the server in
background, slept for 3 seconds in background and started the tests.
Adding another `&` after `sleep 3` would make it actually wait 3
seconds, but instead of doing that we use `timeout` and try the
healthcheck endpoint until the server is ready.

Also upgrade selenium-server.

* Wait for up to 1 minute for selenium-server to become ready

According to this failure:
https://github.com/cobrateam/splinter/runs/7091151103?check_suite_focus=true,
30 seconds may not be enough (!!)

In that log specifically, you can see that the last failure is at
2022-06-28 11:06:25, and the server becomes ready at 11:06:26.519. 1
second difference, so hopefully doubling the timeout is enough.
1dbfdd7

Git stats

Files

Permalink
Failed to load latest commit information.
PyPI PyPI - Python Version GitHub Build status

splinter - python tool for testing web applications

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

browser = Browser()
browser.visit('http://google.com')
browser.fill('q', 'splinter - python acceptance testing for web applications')
browser.find_by_name('btnK').click()

if browser.is_text_present('splinter.readthedocs.io'):
    print("Yes, the official website was found!")
else:
    print("No, it wasn't found... We need to improve our SEO techniques")

browser.quit()

Note: if you don't provide any driver argument to the Browser function, firefox will be used (Browser function documentation).

Changelog

First steps

Splinter open source project

Documentation

Pytest Plugins

Page Objects

Support for page objects is available through the following package:

Deprecated projects:
  • PyPOM, A base page object model for use with Selenium or Splinter functional tests.
  • pypom_form, A PyPOM based package that provides declarative schema based form interaction for page object models compatible with Splinter.

Other Projects Using Splinter

Presentations & Tutorials