Extension for page factory.
Project description
An extension for PageFactory class (selenium-page-factory)
Main class:
ExtendedPageFactory(AssertPageMixin, NavLocatorsMixin, FormButtonsMixin, PageFactory)
Mixins:
AssertPageMixin (title) -> Checks if the current page has the same title as given.
NavLocatorsMixin (nav_locators) -> Provides a class attribute to be added to PageFactory attribute locators. This is a convenient way to add common navbar locators to several Page classes.
FormButtonsMixin (form_buttons) -> Provides a list of form inputs such as save (value='Save'), save_and_new (
value='Save & New'), delete (value='Delete') etc. as a class attribute (form_buttons=[save, save_and_new, delete]). If
a tuple is given the second value indicates the locator. For example if the cancel button is in reality a
link: <a href="">Cancel</a>
, add (cancel, "LINK_TEXT") to form_buttons.
This class provides click methods for each input or link according to form_buttons list: click_save(), click_save_and_new(), click_delete() and click_cancel() would be the click methods in our example case. Other methods with scrolling down before clicking a button (scroll_down_and_click_...) are also available for each form button. click_ and scroll_down_and_click_ methods accept a timeout argument for setting Page.timeout before clicking. For example scroll_down_and_click_save(timeout=3) does following actions: 1. maximizing the window 2. scrolling down to bottom of the window 3. set explicit wait for the save button for 3 seconds (default timeout of Page is 10)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for extended-selenium-page-factory-0.5b0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6581f115dd2c95adb7bc700dd5815f1e3f76c8046e12cca04668d894a22b3a9e |
|
MD5 | ab478be3907bef2e751bb8d126c58fb0 |
|
BLAKE2b-256 | a3a5a847d7ec8ddf0130c5441d2a1cb5d0e18bb08e6441eda5ff47e774b64acb |
Hashes for extended_selenium_page_factory-0.5b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1fc1125f0ac5b777aa126fdebbe2e071db31cdf0190fe223cc78b9638cd7077 |
|
MD5 | dcacb83927441e20ed949d0877e73ed7 |
|
BLAKE2b-256 | 4dcf07b55e58a3435782103189a29bfa55ffe11f455799dd125e27782b1237e8 |