Skip to content

Commit bbabd09

Browse files
committed
Add an example test for Multi-Factor Auth Login
1 parent 4341867 commit bbabd09

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/test_mfa_login.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from seleniumbase import BaseCase
2+
3+
4+
class TestMFALogin(BaseCase):
5+
def test_mfa_login(self):
6+
self.open("https://seleniumbase.io/realworld/login")
7+
self.type("#username", "demo_user")
8+
self.type("#password", "secret_pass")
9+
totp_code = self.get_totp_code("GAXG2MTEOR3DMMDG")
10+
self.type("#totpcode", totp_code)
11+
self.click("#log-in")
12+
self.highlight("img#image1")
13+
self.assert_text("Welcome!", "h1")
14+
self.save_screenshot_to_logs()

0 commit comments

Comments
 (0)