In the website https://www.dezlearn.com/nested-iframes-example/ there are two nested iframes. I started the recorder (in Dramaturg) and clicked the second button. The generated code is:
goto "https://www.dezlearn.com/nested-iframes-example/"
click button "button" --frame "#iframe1"
which fails to execute.
Using the element picker yields the JS locator:
page.locator('iframe[name="demo_parent_iframe"]').contentFrame().locator('iframe[name="demo_frame1"]').contentFrame().getByRole('button', { name: 'Click Here' })
This is a toy example, but actual enterprise applications also have several nested iframes. My suggestion is that the recorder generates the code:
goto "https://www.dezlearn.com/nested-iframes-example/"
click button "Click Here" --frame "#parent_iframe #iframe1"
This uses CSS syntax to represent nested elements, which makes it easy to understand.
In the website https://www.dezlearn.com/nested-iframes-example/ there are two nested iframes. I started the recorder (in Dramaturg) and clicked the second button. The generated code is:
which fails to execute.
Using the element picker yields the JS locator:
This is a toy example, but actual enterprise applications also have several nested iframes. My suggestion is that the recorder generates the code:
This uses CSS syntax to represent nested elements, which makes it easy to understand.