-
Notifications
You must be signed in to change notification settings - Fork 241
Open
Labels
Area: browserThe browser moduleThe browser module
Description
What
Elements inside iframe
s are not accessible through the main page context, usually due to CORS restrictions.
Solution
Use locator.contentFrame()
to access iframe
content, e.g.:
await page.locator('#iframe').contentFrame().getByRole('button').click();
This requires the user to understand the website architecture or be able to work with the devtools window in their web browser.
In the future the hope is that they can work with k6 Studio which will be able to find suitable selectors and create the browser test script for them as they click through on their website.
Metadata
Metadata
Assignees
Labels
Area: browserThe browser moduleThe browser module