Skip to content

Commit fdf3df7

Browse files
committed
Update example tests
1 parent ae80807 commit fdf3df7

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

examples/parameterized_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class GoogleTests(BaseCase):
77
[
88
["PyPI", "pypi.org", 'img[alt="PyPI"]'],
99
["Wikipedia", "www.wikipedia.org", "img.central-featured-logo"],
10-
["SeleniumBase GitHub", "Selenium, Python", 'img[title*="Selen"]'],
10+
["SeleniumBase GitHub.com", "SeleniumBase", 'img[title*="Sele"]'],
1111
]
1212
)
1313
def test_parameterized_google_search(self, search_key, expected_text, img):

examples/test_demo_site.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ def test_demo_site(self):
2121

2222
# Verify that a hover dropdown link changes page text
2323
self.assert_text("Automation Practice", "h3")
24-
self.hover_and_click("#myDropdown", "#dropOption2")
24+
try:
25+
self.hover_and_click("#myDropdown", "#dropOption2")
26+
except Exception:
27+
# If the user moves the mouse while the test runs
28+
self.js_click("#dropOption2")
2529
self.assert_text("Link Two Selected", "h3")
2630

2731
# Verify that a button click changes text on the page

examples/upload_file_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class FileUploadButtonTests(BaseCase):
88
def test_file_upload_button(self):
99
self.open("https://seleniumbase.io/w3schools/file_upload")
10-
self.set_content_to_frame("iframeResult")
10+
self.switch_to_frame("iframeResult")
1111
zoom_in = 'input[type="file"]{zoom: 1.6;-moz-transform: scale(1.6);}'
1212
self.add_css_style(zoom_in)
1313
self.highlight('input[type="file"]')

0 commit comments

Comments
 (0)