-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Description
🚀 Feature Request
I would like to see locators within multiple iframes getting highlighted in Chromium or any browser, so I can troubleshoot my iframe locators easily from Visual Studio Code.
Currently, the following default playwrights locators are highlighted in Chromium.
page.getByText('foo');
page.getByRole('button', { name: 'foo' });
etc...
For locator within one iframe, sometimes I see them getting highlighted in Chromium, sometimes not.
page.frameLocator('iframe').getByText('foo');
And for locators within two or more iframes, I have never seen them getting highlighted in Chromium.
page.frameLocator('iframe1').frameLocator('iframe2').getByText('foo');
page.frameLocator('iframe1').frameLocator('iframe2').frameLocator('iframe3').getByText('foo');
In order for me to troubleshoot these iframe locators, I have to use playwright's highlight method, but I need to run my test every time when I work on a new locator.
let fooLocator = page.frameLocator('iframe1').frameLocator('iframe2').getByText('foo');
await fooLocator .highlight();
With that said, if I can see these locators from Chromium without running my test every time for a new locator, it will greatly increase my efficiency.
Example
No response
Motivation
This will help troubleshoot iframe locators much faster.