webdriver_test_tools.webdriver.support.expected_conditions module

Custom expected condition classes

class webdriver_test_tools.webdriver.support.expected_conditions.element_to_exist(locator)[source]

Bases: object

Custom wait condition for WebdriverWait() that checks if an element exists

class webdriver_test_tools.webdriver.support.expected_conditions.element_to_not_exist(locator)[source]

Bases: object

Custom wait condition for WebdriverWait() that checks if an element does not exists

class webdriver_test_tools.webdriver.support.expected_conditions.element_to_be_enabled(locator)[source]

Bases: object

Custom wait condition for WebdriverWait() that checks if an element is enabled

class webdriver_test_tools.webdriver.support.expected_conditions.element_to_be_disabled(locator)[source]

Bases: object

Custom wait condition for WebdriverWait() that checks if an element is disabled

class webdriver_test_tools.webdriver.support.expected_conditions.element_to_be_in_view(locator, fully_in_view=False)[source]

Bases: object

Custom wait condition for WebDriverWait() that uses JavaScript to check if an element is scrolled into view

class webdriver_test_tools.webdriver.support.expected_conditions.base_url_to_be(url, ignore_trailing_slash=True)[source]

Bases: object

An expectation for checking the current url, ignoring query strings (i.e. strips ‘?’ and everything after it and only looks at the base URL)

url is the expected URL, which must be an exact match with the current base URL

Optionally accepts the parameter ignore_trailing_slash (default: True), which will strip any trailing ‘/’ from the expected URL and current base URL before comparing

returns True if the base URL matches, false otherwise