Skip to content

Commit 974cd3f

Browse files
committed
Update an example test
1 parent f512989 commit 974cd3f

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

examples/test_usefixtures.py

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
class Test_UseFixtures:
66
def test_usefixtures_on_class(self):
77
sb = self.sb
8-
sb.open("https://google.com/ncr")
9-
sb.type('input[title="Search"]', "SeleniumBase GitHub\n")
10-
sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
11-
sb.assert_text("SeleniumBase", 'strong[itemprop="name"]')
12-
sb.assert_text("integrations")
13-
sb.assert_element('a[title="help_docs"]')
14-
sb.click('a[title="examples"]')
15-
sb.assert_exact_text("examples", "strong.final-path")
8+
sb.open("https://seleniumbase.io/realworld/login")
9+
sb.type("#username", "demo_user")
10+
sb.type("#password", "secret_pass")
11+
sb.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG") # 6-digit
12+
sb.assert_text("Welcome!", "h1")
13+
sb.highlight("img#image1") # A fancier assert_element() call
14+
sb.click('a:contains("This Page")')
15+
sb.save_screenshot_to_logs() # In "./latest_logs/" folder.
16+
sb.click_link("Sign out") # Must be "a" tag. Not "button".
17+
sb.assert_element('a:contains("Sign in")')
18+
sb.assert_exact_text("You have been signed out!", "#top_message")

0 commit comments

Comments
 (0)