Questions tagged [shadow-root]

61 questions
3
votes
3 answers

Why do display:flex do not respect shadow root border?

If you toggle display:flex on a shadow root child it also affects the element outside. (All big browsers behave like this.) Why? There is a web component with a shadow root: Inside the shadow…
danyball
  • 33
  • 6
2
votes
1 answer

Can't access the latest version xpath of Google Chrome through Selenium and Chromium

When I access the chrome://settings/help site and tried to access the latest version of Google through Xpath or other channels, I couldn't access it. I just want to get the string of the latest version of Chrome. Are there any reasons or specific…
Xelti
  • 23
  • 3
2
votes
3 answers

How to switch to the child frame within #shadow-root (open) using Selenium

I'm trying to make a web scraper that downloads an image that's inside of an iframe with a child. I can't get Selenium for Chrome to find the correct iframe to switch into. The main issue is the iframe in question doesn't have a name or id so I…
Watson221
  • 73
  • 7
2
votes
1 answer

How to locate the First Name element within #shadow-root (open) using Selenium4 and Java

I am trying to find the element of the field First Name on the page https://whitelabel.sandbox.array.io/signup?platform=v3. I tried searching by id, classname, name, cssSelector, etc. but none works. I even added waiter to ensure it is loaded well…
2
votes
2 answers

Cypress shadow-root inside of shadow-root

How do I find the element that is inside of shadow-root which is inside of other shadow-root? I'm new to this and tried .shadow() function.
grubyfat
  • 31
  • 1
  • 8
2
votes
1 answer

How to get past a cookie agreement modal within a #shadow-root (open) using Python and Selenium?

I am quite new to selenium and python. I am trying to navigate through a webpage (https://www.heise.de/download/) but can't get passed the cookiewall (cookie agreement page). It seems that the webdriver can't find the button to click on. The HTML…
1
vote
1 answer

How to send text within the Search field within multiple shadow-root (open) using Selenium and Python

While yesterday I could easily navigate on archive.org with selenium, today I cannot use selenium functions on the website in any way. Even my code to click on a simple search button does not work. Is there any solution for this? I used import…
1
vote
1 answer

Selenium: cannot use click() on shadow root WebElement

driver.get("https://colp.maps.arcgis.com/apps/dashboards/0334150e430449cf8ac917e347897d46") driver.implicitly_wait(15) cyber_button_outer = driver.find_element(By.XPATH, "//span[@title='Fraud or Cyber Crimes']/ancestor::div[contains(@class,…
Mistlet0e
  • 23
  • 4
1
vote
1 answer

Selenium: How to fetch elements inside #shadow-root (open) that includes a comment

I am trying to fetch an element from html page which is hidden deep in multiple shadow roots with selenium shadow_element = driver.execute_script("return…
1
vote
1 answer

How to click the button on Visa exchange rate calculator using Selenium?

The revised the code from Shawn's answer to the question below to fill in another hidden field, Bank Fee. How to find and fill in the hidden currency input field on a Visa exchange rate calculator using Selenium? The filed I want to fill…
1
vote
1 answer

Vue 3 Custom Element, Cannot access method from vannilla js

I have a custom element created with vue 3. Emitted event works fine but I cannot figure out how to call method from vanilla js. customElements.whenDefined("ts-app").then((app) => { const el =…
themightysapien
  • 8,309
  • 2
  • 17
  • 15
1
vote
1 answer

TestCafe : #shadow-root component on the webpage is not loading

We have a web component under #shadow-root that i want to test using testcafe . But when i try to load the page from the testcafe script, page loads but only #shadow-root component is not loading and any assertion to verify the existence of those…
Mandy
  • 11
  • 1
1
vote
2 answers

Best way to click a button within #shadow-root (open) via Python and Selenium

I am currently dabbling in Python in combination with Selenium. Here I came across the topic of Java Script buttons. I am looking for the smartest way to find out how to execute a Java-Script code (in this case a button) the easiest way. My…
edstrinova
  • 101
  • 1
  • 7
1
vote
0 answers

How to contain a window object inside shadow-root

I have added a script element inside the #shadow-root. The problem is that when the window object is used inside the b2.js file, it still refers to the parent application's window. Is there a way to scope the window object that is used inside the…
Ovidijus Parsiunas
  • 2,512
  • 2
  • 8
  • 18
1
vote
3 answers

C# Selenium: How to click on the button which is inside a shadow-root (open) and has a data-testid attribute

I am working with C# and Selenium and am trying to press this button. I tried a lot of ways to click on this butten. But Selenium seem not able to find the element. My latest try is IWebElement clickableButton =…
1
2 3 4 5