(self)
| 5 | |
| 6 | class FrameTests(BaseCase): |
| 7 | def test_iframe_basics(self): |
| 8 | self.goto("https://seleniumbase.io/w3schools/iframes.html") |
| 9 | self.assert_title("iframe Testing") |
| 10 | self.click("button#runbtn") |
| 11 | self.switch_to_frame("iframeResult") # Enter the iframe |
| 12 | self.assert_text("HTML Iframes", "h2") |
| 13 | self.switch_to_frame('[title*="Iframe"]') # Enter iframe inside iframe |
| 14 | self.assert_text("This page is displayed in an iframe", "h1") |
| 15 | self.switch_to_parent_frame() # Exit only the inner iframe |
| 16 | self.assert_text("Use CSS width & height to specify", "p") |
| 17 | self.switch_to_frame('[title*="Iframe"]') # Enter iframe inside iframe |
| 18 | self.assert_text("seleniumbase.io/w3schools/iframes", "a") |
| 19 | self.switch_to_default_content() # Exit all iframes |
| 20 | self.click("button#runbtn") |
| 21 | self.switch_to_frame("iframeResult") # Go back inside 1st iframe |
| 22 | self.highlight('iframe[title="Iframe Example"]') |
| 23 | |
| 24 | def test_iframes_with_context_manager(self): |
| 25 | self.goto("https://seleniumbase.io/w3schools/iframes.html") |
nothing calls this directly
no test coverage detected