Skip to main content

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.

Metadata

Release files for semantic-locators 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for semantic-locators 2.1.0
File Size Uploaded Provenance Actions
semantic-locators-2.1.0.tar.gz 19.4 kB Without provenance Details for semantic-locators-2.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for semantic-locators 2.1.0
File Interpreter ABI Platform Actions
semantic_locators-2.1.0-py3-none-any.whl Python 3 none any Details for semantic_locators-2.1.0-py3-none-any.whl

Total release size: 39.1 kB

Release files / semantic-locators-2.1.0.tar.gz

Download URL semantic-locators-2.1.0.tar.gz
Size 19.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f4294b13c306d6c22d124e223d344bf358c16a8c57252fdf0033d8882d8ac33f
BLAKE2b-256 checksum
How to use checksums
054025042eb13591172857cb64fd3709cd39ab3fbf089d90c2d949e584cdad41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.9 Linux/5.15.15-1rodete2-amd64

Release files / semantic_locators-2.1.0-py3-none-any.whl

Download URL semantic_locators-2.1.0-py3-none-any.whl
Size 19.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d26d955e29c272c5eb9176264b8f8af9f25a7a120e57377c91e56bf7cc379ed
BLAKE2b-256 checksum
How to use checksums
3f4ee20491167a145f94f1a5da86de2c6cd957cf843d05c2be8616d0fd6e4aab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.9 Linux/5.15.15-1rodete2-amd64

Security for semantic-locators 2.1.0

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.

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