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.

Metadata

Release files for slick-webdriver 1.0.66

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.66
File Interpreter ABI Platform
slick_webdriver-1.0.66-py3-none-any.whl Python 3 none any Details
slick_webdriver-1.0.66-py2-none-any.whl Python 2 none any Details

Total release size: 26.8 kB

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

Download URL slick_webdriver-1.0.66-py3-none-any.whl
Size 13.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a68cbe0254d8dc4f60809e1f650bb20c43dab70d9cf4158ebf281d6aae6b2970
BLAKE2b-256 checksum
How to use checksums
d86f9af54028dff5d8accd31c3ecc09d2523bcdc1b8d1565724afdf79698e5e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

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

Download URL slick_webdriver-1.0.66-py2-none-any.whl
Size 13.4 kB
Tags Python 2
SHA-256 checksum
How to use checksums
2fbca997fed2fe378c81b7bcdd9a16f4853c5ba0d117b2e4c9d6104ec425ba35
BLAKE2b-256 checksum
How to use checksums
b4231c724cdcbdfb99c4f3ea0686967b21b5ad9f82ad0c3742adf027e82b9554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Security for slick-webdriver 1.0.66

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.66 This release

2 release files No provenance

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