We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
with
While inside the with block, the browser should be within the iframe control.
Here's an example test that should demonstrate this feature:
from seleniumbase import BaseCase class FrameTests(BaseCase): def test_iframes_with_context_manager(self): self.open("https://seleniumbase.io/w3schools/iframes.html") with self.frame_switch("iframeResult"): self.assert_text("HTML Iframes", "h2") with self.frame_switch('[title*="Iframe"]'): self.assert_text("This page is displayed in an iframe", "h1") self.assert_text("Use CSS width & height to specify", "p") with self.frame_switch('[title*="Iframe"]'): self.assert_text("seleniumbase.io/w3schools/iframes", "a") self.click("button#runbtn") with self.frame_switch("iframeResult"): self.highlight('iframe[title="Iframe Example"]')
(Based on #1407)
The text was updated successfully, but these errors were encountered:
mdmintz
Successfully merging a pull request may close this issue.
Add a Context Manager method for switching into iframes using a
with
statement.While inside the
with
block, the browser should be within the iframe control.Here's an example test that should demonstrate this feature:
(Based on #1407)
The text was updated successfully, but these errors were encountered: