You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature]: Iframe selector that pierces iframes #7982
Similar to how playwright pierces shadow DOMs, it would be great to have an :iframe selector that can do the same thing. This would allow us to write code that interacts with elements inside iframes in a similar manner.
For example, if we have a document that looks like this:
<html><head></head><body><divid="outside-iframe"></div><iframeid="frame1">
#document
<html><head></head><body><divclass="inside-iframe">This is the Element I want</div></body></html></iframe></body></html>
Maybe we can have a selector called :iframe to access element inside the iframe:
Reacted by Radek Bednarik, Craig Moir, Maksim Yakubovskiy, Gautier Ben Aïm, tnypxl, Oscar Rieken, Ross Wollman, Bjarki Hall, Shirshak, John Hill and 13 more
When working with iframes, you now can create a frame locator that will enter the iframe and allow selecting elements
in that iframe. Following snippet locates element with text "Submit" in the iframe with id my-frame,
like <iframe id="my-frame">:
Activity
splurgeop commentedon Aug 5, 2021
would be good to have this feature in playwright.
unlikelyzero commentedon Aug 31, 2021
This would be a key differentiator in the e2e testing world.
aslushnikov commentedon Nov 8, 2021
this is fixed! It will be released in 1.17
When working with iframes, you now can create a frame locator that will enter the iframe and allow selecting elements
in that iframe. Following snippet locates element with text "Submit" in the iframe with id
my-frame,like
<iframe id="my-frame">: