Skip to main content

Website at: http://www.slickqa.com/webdriver/python Extensive documentation at: http://www.slickqa.com/webdriver/python/docs

Webdriver wrapper for SlickQA Project

Don’t let the name fool you, this wrapper can be used by any project. It was written by the people who brought you the slick project, hence the name. This wrapper has the purpose of making the selenium interface more reliable for tests with less, more readable code by:

  • Wrapping all actions with log statements (using python’s builtin logging framework) that detail everything it’s doing

  • Providing a nice readable api, making your tests readable

  • Waiting for elements to exist (with customizable timeout) so that you don’t have to

  • Providing a Page api that allows for easy organization of locators

  • Page api allows for flat (Page -> locator) and nested (FrameworkElement -> Page -> Container -> Locator) api

  • No need to instantiate every page class individually (avoiding boilerplate code)

  • Event based api where you can add your own pre and post actions as part of standard calls (like taking a screenshot on click)

  • more good tidbits

Example Usage

What does a test using this fabulous framework look like? Let me show you:

from slickwd import BrowserType, Browser, Container, WebElementLocator, Find
from nose import with_setup
from nose.tools import assert_regexp_matches

# Page Classes --------------------------------------------------
class GoogleSearchPage(Container):
    Search_Query_Text_Field = WebElementLocator("Search Box", Find.by_name("q"))
    Search_Button = WebElementLocator("Search Button", Find.by_name("btnG"))

    def is_current_page(self, browser):
        return browser.exists(GoogleSearchPage.Search_Query_Text_Field, timeout=0, log=False)

class SearchResultsPage(Container):
    Results_Div = WebElementLocator("Results Div", Find.by_id("ires"))

    def is_current_page(self, browser):
        return browser.exists(SearchResultsPage.Results_Div, timeout=0, log=False)

# Tests ---------------------------------------------------------
browser = None


def s():
    global browser
    if browser is not None:
        browser.quit()
    browser = Browser(BrowserType.FIREFOX)

def cleanup():
    global browser
    if browser is not None:
        browser.quit()

@with_setup(s, cleanup)
def test_google_search():
    global browser
    browser.go_to('http://www.google.com')
    browser.wait_for_page(GoogleSearchPage)
    browser.click_and_type(GoogleSearchPage.Search_Query_Text_Field, "Slick Test Manager")
    browser.click(GoogleSearchPage.Search_Button)
    browser.wait_for_page(SearchResultsPage)
    assert_regexp_matches(browser.get_page_text(), '.*SlickQA:.*')

The test is written so the code can be read, easily modified if something in the page is changed, and allow for code reuse (page classes). Normally page classes would be held in a different module for better organization. This is what is referred to in the documentation as the “static page class model”. There is also a different way to structure page classes that allows for nesting of containers (page classes) to make a hierarchy and enable code completion in IDEs.

Release files for slick-webdriver 1.0.41

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for slick-webdriver 1.0.41
File Interpreter ABI Platform
slick_webdriver-1.0.41-py3-none-any.whl Python 3 none any Details
slick_webdriver-1.0.41-py2-none-any.whl Python 2 none any Details

Total release size: 27.4 kB

Release files / slick_webdriver-1.0.41-py3-none-any.whl

Download URL slick_webdriver-1.0.41-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67d35c0ff998ed0418d2c3a63a5004cff67659a6d3bf6bbab512469e91d76661
BLAKE2b-256 checksum
How to use checksums
5a966c1da62fc02fe333be7bf7a44c9bb1a0ad74884ac941429a8ed352d7b592
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / slick_webdriver-1.0.41-py2-none-any.whl

Download URL slick_webdriver-1.0.41-py2-none-any.whl
Size 13.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
7232ff7ef43cac3eccae2ab152feb2be7fdee72f6bc34fa9480bc3e2e6d8068b
BLAKE2b-256 checksum
How to use checksums
4bed48ca8c276e3e1ee65b2130499acc2e4cf67a76cdc1ece93e30e0eb6eaaee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.0.66

2 release files

1.0.65

2 release files

1.0.64

2 release files

1.0.63

2 release files

1.0.62

2 release files

1.0.61

2 release files

1.0.58

2 release files

1.0.57

2 release files

1.0.56

2 release files

1.0.55

2 release files

1.0.54

2 release files

1.0.53

2 release files

1.0.52

2 release files

1.0.51

2 release files

1.0.46

2 release files

1.0.45

2 release files

1.0.44

2 release files

1.0.43

2 release files

1.0.42

2 release files

This release

1.0.41 This release

2 release files

1.0.39

2 release files

1.0.38

2 release files

1.0.37

2 release files

1.0.36

2 release files

1.0.35

2 release files

1.0.34

2 release files

1.0.33

2 release files

1.0.32

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0dev

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page