Skip to content

Commit 2711637

Browse files
committed
Update example tests
1 parent 0cd11b5 commit 2711637

10 files changed

+13
-7
lines changed

examples/nth_child_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ class NthChildSelectorTests(BaseCase):
55
def test_locate_rows_with_colors(self):
66
self.open("https://xkcd.com/color/rgb/")
77
tbody = "center > table tbody"
8-
self.demo_mode = True
8+
if not (self.headless or self.xvfb):
9+
self.demo_mode = True
10+
self.demo_sleep = 0.5
11+
self.message_duration = 2.0
912
self.highlight(tbody)
1013
self.post_message("Part 1: Assert text in given row.")
1114
self.assert_text("teal", tbody + " tr:nth-child(2)")

examples/parameterized_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class GoogleTests(BaseCase):
1212
)
1313
def test_parameterized_google_search(self, search_key, expected_text, img):
1414
self.open("https://google.com/ncr")
15+
self.hide_elements('iframe')
1516
self.type('input[title="Search"]', search_key + "\n")
1617
self.assert_text(expected_text, "#search")
1718
self.click('a:contains("%s")' % expected_text)

examples/test_hack_search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
class HackingTests(BaseCase):
1010
def test_hack_search(self):
1111
self.open("https://google.com/ncr")
12+
self.hide_elements('iframe')
1213
self.assert_element('input[title="Search"]')
1314
self.set_attribute('[action="/search"]', "action", "//bing.com/search")
1415
self.set_attributes('[value="Google Search"]', "value", "Bing Search")

examples/test_skype_site.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ def test_skype_mobile_site(self):
1515
print("\n This test is only for mobile-device web browsers!")
1616
print(' (Use "--mobile" to run this test in Mobile Mode!)')
1717
self.skip('Use "--mobile" to run this test in Mobile Mode!')
18-
self.open("https://www.skype.com/en/")
19-
self.highlight('[itemprop="url"]')
20-
self.highlight("h1")
21-
self.highlight('[data-bi-area="meet-now-home-page"]')
22-
self.highlight_click('[data-bi-name="skype-download-home-page"]')
18+
self.open("https://www.skype.com/en/get-skype/")
2319
self.assert_element('[aria-label="Microsoft"]')
2420
self.assert_text("Download Skype", "h1")
2521
self.highlight("div.appBannerContent")

examples/tour_examples/bootstrap_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class MyTourClass(BaseCase):
55
def test_google_tour(self):
66
self.open("https://google.com/ncr")
77
self.wait_for_element('input[title="Search"]')
8+
self.hide_elements('iframe')
89

910
self.create_bootstrap_tour() # OR self.create_tour(theme="bootstrap")
1011
self.add_tour_step("Welcome to Google!", title="SeleniumBase Tours")

examples/tour_examples/google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class MyTourClass(BaseCase):
55
def test_google_tour(self):
66
self.open("https://google.com/ncr")
77
self.wait_for_element('input[title="Search"]')
8+
self.hide_elements('iframe')
89

910
# Create a website tour using the ShepherdJS library with "dark" theme
1011
# Same as: self.create_shepherd_tour(theme="dark")

examples/tour_examples/hopscotch_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class MyTourClass(BaseCase):
55
def test_google_tour(self):
66
self.open("https://google.com/ncr")
77
self.wait_for_element('input[title="Search"]')
8+
self.hide_elements('iframe')
89

910
self.create_hopscotch_tour() # OR self.create_tour(theme="hopscotch")
1011
self.add_tour_step("Welcome to Google!", title="SeleniumBase Tours")

examples/tour_examples/introjs_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class MyTourClass(BaseCase):
55
def test_google_tour(self):
66
self.open("https://google.com/ncr")
77
self.wait_for_element('input[title="Search"]')
8+
self.hide_elements('iframe')
89

910
self.create_introjs_tour() # OR self.create_tour(theme="introjs")
1011
self.add_tour_step("Welcome to Google!", title="SeleniumBase Tours")

examples/tour_examples/octocat_tour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_octocat_tour(self):
1616
self.add_tour_step(
1717
"This is not the page you're looking for.", 'img[alt*="404"]'
1818
)
19-
self.add_tour_step("<b>Have a great day!</b>", title="☀️ ☀️ ☀️ ☀️")
19+
self.add_tour_step("<b>Have a great day!</b>", title="😃 ☀️ 😁")
2020
self.add_tour_step("<b>And may the Force be with you!</b>", title="⭐")
2121
self.export_tour(filename="octocat_tour.js")
2222
self.play_tour()

examples/tour_examples/shepherd_google_tour.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ class MyTourClass(BaseCase):
55
def test_google_tour(self):
66
self.open("https://google.com/ncr")
77
self.wait_for_element('input[title="Search"]')
8+
self.hide_elements('iframe')
89

910
self.create_shepherd_tour(theme="dark")
1011
self.add_tour_step("Welcome to Google!", title="SeleniumBase Tours")

0 commit comments

Comments
 (0)