Glance DOM
Quickly reference DOM elements with minimal inspection.
To learn more about Glance DOM visit the Glance Website.
Installation
Installation requires pip:
pip install glance-dom
Usage
Instantiate Glance DOM using a browser driver (for example, WebDriver).
from selenium import webdriver
from glance_dom import GlanceDom
def test_glance():
driver = webdriver.Firefox()
driver.get('http://quasimatic.org/glance')
# Using the old way
languages = driver.find_element_by_css_selector('h2#other-languages + ul > li')
# Using Glance
glance = GlanceDom(driver)
languages = glance.get_element('Other Languages > li')
print(languages.text)
You can also get a list of matching elements using get_elements
Exceptions
get_element will raise NoReferenceError if the reference did not match any elements. Similarly it will raise TooBroadReferenceError it there are more than one match.
Metadata
Release files for glance_dom 0.11.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| glance_dom-0.11.5.tar.gz | 11.2 kB | Without provenance | Details for glance_dom-0.11.5.tar.gz |
Release files / glance_dom-0.11.5.tar.gz
| Download URL | glance_dom-0.11.5.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bb2d7775ae473e59808be2cd6e6a94597b36e002696ee46084cd72f95d17440
|
|
BLAKE2b-256 checksum How to use checksums |
11f235c28906e53a138547f6820a9b36b300e545d194f32b14a4a346c3153e28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for glance_dom 0.11.5
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.