Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for getting elements from within iFrames #45

Closed
Badgerati opened this issue Feb 10, 2020 · 0 comments · Fixed by #46
Closed

Support for getting elements from within iFrames #45

Badgerati opened this issue Feb 10, 2020 · 0 comments · Fixed by #46
Assignees
Milestone

Comments

@Badgerati
Copy link
Owner

When elements are contained within an iframe, Get-MonocleElement fails to find the element. In order for Selenium to find these elements, we need to switch context to the iframe.

To do this a new Enter-MonocleFrame will be created, this will switch the Selenium context to the iframe, run a script, and then exit the context back to the parent frame:

Get-MonocleElement -Id 'form-frame' | Enter-MonocleFrame -ScriptBlock {
    Get-MonocleElement -Id 'element-in-iframe'
    #etc
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant