Questions tagged [shadow-dom]

Shadow DOM, a key part of Web Components, allows you to create component-based apps using a subtree of DOM elements maintained in isolation from the main DOM.

Shadow DOM gives you access to native implementations of markup, and therein the power to edit, and create your own.

Shadow DOM is defined within the DOM Standard at https://dom.spec.whatwg.org/#shadow-trees

See also:

1500 questions
0
votes
1 answer

Preserving Shadow Dom host content

I am creating a ShadowDom on a DOM element/host. I can preserve, still be visible, the respective host childElements by using the select attribute, however the text childNode that is inside the host is not selected and there for remains…
Mircea
  • 11,373
  • 26
  • 64
  • 95
0
votes
2 answers

failing to populate shadow DOM (following tutorial)

I'm playing the the Shadow DOM 101 tutorial at html5rocks. I'm using Chrome 25.0.1364.172 and when I try to appendChild to the Shadow DOM root (as shown in the tutorial) I get an Uncaught Error: NotFoundError: DOM Exception 8. I guess I'm missing…
alonisser
  • 11,542
  • 21
  • 85
  • 139
-1
votes
2 answers

Unable to handle Shadow Element

I am trying to print nested shadow element text using below code but no luck. I have tried to use same code throough console windows and its giving me expected text. Code : import org.openqa.selenium.JavascriptException; import…
SeleniumUser
  • 4,065
  • 2
  • 7
  • 30
-1
votes
1 answer

How to click a pdfviewer download button in shadowroot(open) with selenium Python

I'm accessing this url (https://cissearch.kcc.gov.tw/System/Bulletin/View.aspx?BulletinSN=239928&pages=9957#pdfStart) with selenium in python, and I'm trying to click on the download button in the pdfviewer. I've tried adding options as suggested…
Hackore
  • 163
  • 1
  • 12
-1
votes
1 answer

Can't click on a specific element using selenium/python (tried iframe and all the methods that I know or found here)

I am trying to reach a website using Selenium and Python. Once the website is loaded, there is like an iframe/pop-up above the website and I need to click on "Alles akzeptieren" but I can't target the element no matter what method I try. I left all…
-1
votes
1 answer

Scrape shadow root (open) tag using Selenium in Python

I have to scrap a web page for the last updated date using python. A snippet of the html page is given below.
-1
votes
3 answers

Select shadow div text from page

I have an AppleScript I wrote that gets some information from a webpage (that's not mine), but the page has recently updated so that a value I need is in the shadow DOM, and not the main DOM (as shown in the Safari's Web Inspector). Before, I was…
Dov
  • 15,530
  • 13
  • 76
  • 177
-1
votes
1 answer

Please tell me what a unique selector is set on puppeteer, when elements have duplicate query selector

My Html code has Button-tags that have same id "hoge". If you get the selector from the Chrome Dev Tool, it will be the same for both "#hoge".
#shadow-root (open) …
Pirikara
  • 343
  • 3
  • 12
-1
votes
1 answer

How to edit #shadow-root (user-agent) value in selenium with Python

My working environment is Python, Chrome, Selenium I want to edit shadow-root (user-agent)'s value
#shadow-root…
yeji
  • 1
  • 3
-1
votes
1 answer

How to acces this div

I need to access the class chat-wrapper I've tried all of those options // 1 --> error: document.querySelector(...).shadowRoot.querySelector(...).shadowRoot.getElementByClassName is not a function at…
Omar
  • 1,029
  • 2
  • 13
  • 33
-1
votes
1 answer

Custom Elements rendering once only

I want to be able to create reusable custom elements. With my current implementation, each of the custom elements renders only once. All the elements (all 4) are injected into the DOM, but only the first instance of each is rendered. I have tried…
go4cas
  • 1,171
  • 5
  • 14
  • 27
-1
votes
2 answers

I am not able to interact with an Element that is inside a #shadow-root and has an