Loading…
Loading…
The Practice Hub renders prices through a custom element:
1<shadow-price value="129.99"></shadow-price>Its shadow root contains:
1#shadow-root (open)
2 <span class="price">$129.99</span>Your colleague's Selenium test fails with NoSuchElementException:
1String price = driver.findElement(By.cssSelector("span.price")).getText();
2assertEquals("$129.99", price);Your task: explain why it fails, then show how to read that price in Selenium, Playwright and Cypress. Finish with the assertion you would actually write and why it differs from the one above.
Write your own answer first — the defect report, the case table, the locator, whatever the question asks for. An interviewer grades your reasoning, not your recall.
Practice this live with an AI interviewer
Starts a QA mock interview pre-filled with this problem — you can edit the brief before starting.