3

How can we apply wait on shadow dom web elements using selenium webdriver? The normal wait using the following code doesn't seem to work on shadow elements.

WebDriverWait(driver,15).until(EC.visibility_of_all_elements_located((By.XPATH,"/html/body/widget-commponent//div/div[2]")))

Kindly help if anyone knows how to do that. Thanks.

  • another valid question shot down... those supposed answers show how to access a shadowed element but not how to use an explicit wait on it. – sebdelsol Feb 14 '22 at 13:21
  • Here's what I found in Java. wait.until(ExpectedConditions.visibilityOf(shadowRoot.findElement(By.className("example-class-name")))); – Jamato Apr 19 '23 at 14:05

0 Answers0