Skip to content

Commit e04d6d8

Browse files
authored
Merge pull request #836 from seleniumbase/update-tours-and-dependencies
Update options, tours, dependencies, and more
2 parents e7a1b2d + ead43de commit e04d6d8

32 files changed

+142
-74
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ The code above will leave your browser window open in case there's a failure. (i
358358
--headless # (Run tests headlessly. Default mode on Linux OS.)
359359
--headed # (Run tests with a GUI on Linux OS.)
360360
--locale=LOCALE_CODE # (Set the Language Locale Code for the web browser.)
361+
--interval=SECONDS # (The autoplay interval for presentations & tour steps)
361362
--start-page=URL # (The starting URL for the web browser when tests begin.)
362363
--archive-logs # (Archive existing log files instead of deleting them.)
363364
--archive-downloads # (Archive old downloads instead of deleting them.)

examples/edge_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
from seleniumbase import BaseCase
55

66

7-
class EdgeTestClass(BaseCase):
7+
class EdgeTests(BaseCase):
88

99
def test_edge(self):
1010
if self.browser != "edge":
1111
print("\n This test is only for Microsoft Edge (Chromium)!")
12-
print(" (Run with: '--browser=edge')")
13-
self.skip("This test is only for Microsoft Edge (Chromium)!")
12+
print(' (Run this test using "--edge" or "--browser=edge")')
13+
self.skip('Use "--edge" or "--browser=edge"')
1414
self.open("edge://settings/help")
1515
self.assert_element('img[alt="Edge logo"] + span')
1616
self.highlight('#section_about div + div')

examples/example_logs/ReadMe.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<h3><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Logging, Dashboards, and Reports:</h3>
22

33
[<img src="http://img.youtube.com/vi/XpuJCjJhJwQ/0.jpg" title="SeleniumBase Features" width="285">](https://www.youtube.com/watch?v=XpuJCjJhJwQ)
4-
<p>(<b><a href="https://www.youtube.com/watch?v=XpuJCjJhJwQ">SB Dashboard Tutorial on YouTube</a></b>)</p>
4+
<p>(<b><a href="https://www.youtube.com/watch?v=XpuJCjJhJwQ">SBase Dashboard Tutorial on YouTube</a></b>)</p>
55

66
🔵 During test failures, logs and screenshots from the most recent test run will get saved to the ``latest_logs/`` folder. If ``--archive-logs`` is specified (or if ARCHIVE_EXISTING_LOGS is set to True in [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py)), test logs will also get archived to the ``archived_logs/`` folder. Otherwise, the log files will be cleaned out when the next test run begins (by default).
77

examples/raw_parameter_script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
sb.ad_block_on = False
8282
sb.highlights = None
8383
sb.check_js = False
84+
sb.interval = None
8485
sb.cap_file = None
8586
sb.cap_string = None
8687

examples/swag_labs_suite.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ def test_swag_labs_basic_flow(self, username):
2828
""" This test checks functional flow of the Swag Labs store.
2929
This test is parameterized on the login user. """
3030
self.login_to_swag_labs(username=username)
31+
if username == "problem_user":
32+
print("\n(This test should fail)")
3133

3234
# Verify that the "Test.allTheThings() T-Shirt" appears on the page
3335
item_name = "Test.allTheThings() T-Shirt"
@@ -91,6 +93,8 @@ def test_swag_labs_products_page_links(self, username):
9193
""" This test checks for 404s on the Swag Labs products page.
9294
This test is parameterized on the login user. """
9395
self.login_to_swag_labs(username=username, v1=True)
96+
if username == "problem_user":
97+
print("\n(This test should fail)")
9498
self.assert_no_404_errors()
9599

96100
@parameterized.expand([
@@ -102,6 +106,8 @@ def test_swag_labs_visual_regressions(self, username):
102106
""" This test checks for visual regressions on the Swag Labs page.
103107
This test is parameterized on the login user. """
104108
self.login_to_swag_labs(username="standard_user")
109+
if username == "problem_user":
110+
print("\n(This test should fail)")
105111
self.check_window(baseline=True)
106112
self.login_to_swag_labs(username=username)
107113
self.check_window(level=3)

examples/test_deferred_asserts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class MyTestClass(BaseCase):
1313
def test_deferred_asserts(self):
1414
self.open('https://xkcd.com/993/')
1515
self.wait_for_element('#comic')
16-
print("\n(This test fails on purpose)")
16+
print("\n(This test should fail)")
1717
self.deferred_assert_element('img[alt="Brand Identity"]')
1818
self.deferred_assert_element('img[alt="Rocket Ship"]') # Will Fail
1919
self.deferred_assert_element('#comicmap')

examples/test_fail.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ class MyTestClass(BaseCase):
1313
@pytest.mark.expected_failure
1414
def test_find_army_of_robots_on_xkcd_desert_island(self):
1515
self.open("https://xkcd.com/731/")
16-
print("\n(This test fails on purpose)")
16+
print("\n(This test should fail)")
1717
self.assert_element("div#ARMY_OF_ROBOTS", timeout=1)

examples/test_skype_site.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99
from seleniumbase import BaseCase
1010

1111

12-
class SkypeWebsiteTestClass(BaseCase):
12+
class SkypeTests(BaseCase):
1313

14-
def test_skype_website_on_mobile(self):
14+
def test_skype_mobile_site(self):
1515
if not self.mobile_emulator:
16-
print("\n This test is only for mobile devices / emulators!")
17-
print(" (Usage: '--mobile' with a Chromium-based browser.)")
18-
self.skip("Please rerun this test using '--mobile' !!!")
16+
print("\n This test is only for mobile-device web browsers!")
17+
print(' (Use "--mobile" to run this test in Mobile Mode!)')
18+
self.skip('Use "--mobile" to run this test in Mobile Mode!')
1919
self.open("https://www.skype.com/en/")
2020
self.assert_text("Install Skype", "div.appInfo")
2121
self.highlight("div.appBannerContent")

examples/test_suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def test_1(self):
1515

1616
@pytest.mark.expected_failure
1717
def test_2(self):
18-
print("\n(This test fails on purpose)")
18+
print("\n(This test should fail)")
1919
self.open("https://xkcd.com/1675/")
2020
raise Exception("FAKE EXCEPTION: This test fails on purpose.")
2121

@@ -27,6 +27,6 @@ def test_3(self):
2727

2828
@pytest.mark.expected_failure
2929
def test_4(self):
30-
print("\n(This test fails on purpose)")
30+
print("\n(This test should fail)")
3131
self.open("https://xkcd.com/1670/")
3232
self.assert_element("FakeElement.DoesNotExist", timeout=0.5)

examples/timeout_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ class MyTestClass(BaseCase):
1515
def test_time_limit_feature(self):
1616
self.set_time_limit(5) # Fail test if time exceeds 5 seconds
1717
self.open("https://xkcd.com/1658/")
18-
print("\n(This test fails on purpose)")
18+
print("\n(This test should fail)")
1919
self.sleep(7)

0 commit comments

Comments
 (0)