Skip to content

Commit a49a3c1

Browse files
committed
Update a test for entering iframes and double-clicking
1 parent 140d64a commit a49a3c1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

examples/test_double_click.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,18 @@
33

44
class MyTestClass(BaseCase):
55

6-
def test_double_click(self):
6+
def test_double_click_and_switch_to_frame(self):
77
self.open("https://www.w3schools.com/jsref"
88
"/tryit.asp?filename=tryjsref_ondblclick")
9-
self.switch_to_frame("iframeResult")
9+
self.ad_block()
10+
self.switch_to_frame("#iframeResult")
11+
self.double_click('[ondblclick="myFunction()"]')
12+
self.assert_text("Hello World", "#demo")
13+
14+
def test_double_click_and_switch_to_frame_of_element(self):
15+
self.open("https://www.w3schools.com/jsref"
16+
"/tryit.asp?filename=tryjsref_ondblclick")
17+
self.ad_block()
18+
self.switch_to_frame_of_element('[ondblclick="myFunction()"]')
1019
self.double_click('[ondblclick="myFunction()"]')
1120
self.assert_text("Hello World", "#demo")

0 commit comments

Comments
 (0)