Skip to content

The recorder does not support nested iframes #815

Description

@mardukbp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions