Semantic Locators are a human readable, resilient and accessibility-enforcing way to find web elements. This package adds semantic locator support to webdriver
Project description
Semantic Locators in Java WebDriver
Semantic locators can be used with Selenium WebDriver in a similar way to
ByXPath
or ByCssSelector
.
Install from PyPi:
python -m pip install semantic-locators
Once installed, use Semantic Locators as follows:
from semantic_locators import (
find_element_by_semantic_locator,
find_elements_by_semantic_locator,
closest_precise_locator_for,
)
...
search_button = find_element_by_semantic_locator(driver, "{button 'Google search'}")
all_buttons = find_elements_by_semantic_locator(driver, "{button}")
generated = closest_precise_locator_for(search_button); # {button 'Google search'}
General Semantic Locator documentation can be found on GitHub.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
semantic-locators-2.0.0.tar.gz
(18.9 kB
view hashes)
Built Distribution
Close
Hashes for semantic_locators-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a119f19fb098d953047de645e12cd48c7b68cc2186f994af749f3b09b366a54a |
|
MD5 | aa1ad173949c23ad86d67fbe7ebc91da |
|
BLAKE2b-256 | ff875d561c6649e9ae1a436c95f12dfecbb22ddfc8ec405750f1d87b82edb685 |