Skip to content

Commit bd573f1

Browse files
committed
Update comments
1 parent aac8d29 commit bd573f1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

examples/test_contains_selector.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
""" TAG:contains("TEXT") is a special, non-standard CSS Selector
2+
that gets converted to XPath: '//TAG[contains(., "TEXT")]'
3+
before it's used by Selenium calls. Also part of jQuery. """
14
from seleniumbase import BaseCase
25

36

examples/test_mfa_login.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ def test_mfa_login(self):
66
self.open("https://seleniumbase.io/realworld/login")
77
self.type("#username", "demo_user")
88
self.type("#password", "secret_pass")
9-
self.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG")
10-
self.highlight("img#image1")
9+
self.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG") # 6-digit
10+
self.highlight("img#image1") # A fancier assert_element() call
1111
self.click('a:contains("This Page")')
1212
self.assert_text("Welcome!", "h1")
13-
self.save_screenshot_to_logs()
13+
self.save_screenshot_to_logs() # In "./latest_logs/" folder.
14+
self.click_link("Sign out") # Must be "a" tag. Not "button".
15+
self.assert_element('a:contains("Sign in")')
16+
self.assert_text("You have been signed out!", "#top_message")

0 commit comments

Comments
 (0)