This can be used along with selenium to identify Shadow Elements present under Shadow DOM/Shadow Root
Project description
Used along with selenium to identify Shadow Elements present under Shadow DOM.
The Structure of shadow DOM would be as below:
Shadow Host -> Shadow Root -> Shadow DOM Elements
check the shadow dom by inspecting the website here:
https://shrinivasbb.github.io/ShadowDomSite
Use this module to get Shadow DOM Elements matching the CSS selectors.
For usage check the below link:
https://github.com/shrinivasbb/shadowselenium
For implementation check the tests folder.
from shadowselenium import ShadowElement
shadowdom = ShadowElement(driver) #argument should be driver instance of opened browser i.e chromedriver etc.
shadowelement = shadowdom.find_shadow_element_by_css("shadow-hostnav", ".nav-link")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
shadowselenium-1.0.0.tar.gz
(2.4 kB
view hashes)
Built Distribution
Close
Hashes for shadowselenium-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 715a719df17368ce7047368a8a3a2dd13247efbb8a6667863cddc6c3330359b6 |
|
MD5 | fb6efb4e1bf1456271357bdf0d4d547d |
|
BLAKE2b-256 | 83c444f263462ef15b9da8c47b0a440e67086f0d5039efed3b10e41a6c8ddd75 |