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 Python WebDriver
Semantic locators can be used with Selenium WebDriver in a similar way to
ByXPath
or ByCssSelector
. Currently only available for Python 3.6+.
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.1.0.tar.gz
(19.4 kB
view details)
Built Distribution
File details
Details for the file semantic-locators-2.1.0.tar.gz
.
File metadata
- Download URL: semantic-locators-2.1.0.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.9 Linux/5.15.15-1rodete2-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4294b13c306d6c22d124e223d344bf358c16a8c57252fdf0033d8882d8ac33f |
|
MD5 | 522ad13bfc67caeb4f2c200bbd36d7bc |
|
BLAKE2b-256 | 054025042eb13591172857cb64fd3709cd39ab3fbf089d90c2d949e584cdad41 |
File details
Details for the file semantic_locators-2.1.0-py3-none-any.whl
.
File metadata
- Download URL: semantic_locators-2.1.0-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.9 Linux/5.15.15-1rodete2-amd64
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d26d955e29c272c5eb9176264b8f8af9f25a7a120e57377c91e56bf7cc379ed |
|
MD5 | 1b98f6cb1e0e567fce60079dccc5d55f |
|
BLAKE2b-256 | 3f4ee20491167a145f94f1a5da86de2c6cd957cf843d05c2be8616d0fd6e4aab |