Skip to content

Commit 6ee416d

Browse files
committed
Update an integrations example test
1 parent 10bcb66 commit 6ee416d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

integrations/node_js/test_demo_site.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from seleniumbase import BaseCase
2+
BaseCase.main(__name__, __file__)
23

34

45
class DemoSiteTests(BaseCase):
@@ -42,21 +43,21 @@ def test_demo_site(self):
4243

4344
# Verify that a slider control updates a progress bar
4445
self.assert_element('progress[value="50"]')
45-
self.press_right_arrow("#myslider", times=5)
46+
self.set_value("input#mySlider", "100")
4647
self.assert_element('progress[value="100"]')
4748

4849
# Verify that a "select" option updates a meter bar
4950
self.assert_element('meter[value="0.25"]')
5051
self.select_option_by_text("#mySelect", "Set to 75%")
5152
self.assert_element('meter[value="0.75"]')
5253

53-
# Assert an element located inside an iFrame
54+
# Assert an element located inside an iframe
5455
self.assert_false(self.is_element_visible("img"))
5556
self.switch_to_frame("#myFrame1")
5657
self.assert_true(self.is_element_visible("img"))
5758
self.switch_to_default_content()
5859

59-
# Assert text located inside an iFrame
60+
# Assert text located inside an iframe
6061
self.assert_false(self.is_text_visible("iFrame Text"))
6162
self.switch_to_frame("#myFrame2")
6263
self.assert_true(self.is_text_visible("iFrame Text"))
@@ -83,7 +84,7 @@ def test_demo_site(self):
8384
self.assert_true(self.is_selected("#checkBox3"))
8485
self.assert_true(self.is_selected("#checkBox4"))
8586

86-
# Verify that clicking an iFrame checkbox selects it
87+
# Verify that clicking an iframe checkbox selects it
8788
self.assert_false(self.is_element_visible(".fBox"))
8889
self.switch_to_frame("#myFrame3")
8990
self.assert_true(self.is_element_visible(".fBox"))
@@ -112,6 +113,7 @@ def test_demo_site(self):
112113
self.highlight("h2")
113114

114115
# Actions with Demo Mode enabled
115-
self.demo_mode = True
116+
if self.headed:
117+
self.activate_demo_mode()
116118
self.type("input", "Have a Nice Day!")
117119
self.assert_text("SeleniumBase", "h2")

0 commit comments

Comments
 (0)