Loading…
Loading…
The Practice Hub component lab embeds a policy frame:
1<iframe title="Practice content frame" name="practice-frame"
2 srcdoc="<main><h1>Iframe checkout policy</h1><button id='frame-action'>Acknowledge</button></main>">
3</iframe>A test needs to click #frame-action and then assert on a message that appears in the parent page afterwards.
The current attempt throws NoSuchElementException:
1driver.findElement(By.id("frame-action")).click();Your task: explain the failure, write a correct version in Selenium and Playwright, and identify the mistake that will break the parent-page assertion even after the click starts working.
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.