Skip to main content

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


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 details)

Uploaded Source

Built Distribution

shadowselenium-1.0.0-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file shadowselenium-1.0.0.tar.gz.

File metadata

  • Download URL: shadowselenium-1.0.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.7.7 Windows/10

File hashes

Hashes for shadowselenium-1.0.0.tar.gz
Algorithm Hash digest
SHA256 7f539c92b1d1a030c178436e53971adcd47e26249411e46c9a90e0dc616dd635
MD5 e0cfb48bea4cbb4add0b5ff069b58c37
BLAKE2b-256 7c8e683794111bd7c13b9137ca630ca3684e99ede66b92456b744bd6ccd41e83

See more details on using hashes here.

File details

Details for the file shadowselenium-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: shadowselenium-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 2.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.9 CPython/3.7.7 Windows/10

File hashes

Hashes for shadowselenium-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 715a719df17368ce7047368a8a3a2dd13247efbb8a6667863cddc6c3330359b6
MD5 fb6efb4e1bf1456271357bdf0d4d547d
BLAKE2b-256 83c444f263462ef15b9da8c47b0a440e67086f0d5039efed3b10e41a6c8ddd75

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page