From 974cd3f532d0613cb123378e62dd577bbff67de0 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Wed, 24 Aug 2022 10:30:22 -0400 Subject: [PATCH] Update an example test --- examples/test_usefixtures.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/examples/test_usefixtures.py b/examples/test_usefixtures.py index 52c31694..67533eaa 100644 --- a/examples/test_usefixtures.py +++ b/examples/test_usefixtures.py @@ -5,11 +5,14 @@ import pytest class Test_UseFixtures: def test_usefixtures_on_class(self): sb = self.sb - sb.open("https://google.com/ncr") - sb.type('input[title="Search"]', "SeleniumBase GitHub\n") - sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]') - sb.assert_text("SeleniumBase", 'strong[itemprop="name"]') - sb.assert_text("integrations") - sb.assert_element('a[title="help_docs"]') - sb.click('a[title="examples"]') - sb.assert_exact_text("examples", "strong.final-path") + sb.open("https://seleniumbase.io/realworld/login") + sb.type("#username", "demo_user") + sb.type("#password", "secret_pass") + sb.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG") # 6-digit + sb.assert_text("Welcome!", "h1") + sb.highlight("img#image1") # A fancier assert_element() call + sb.click('a:contains("This Page")') + sb.save_screenshot_to_logs() # In "./latest_logs/" folder. + sb.click_link("Sign out") # Must be "a" tag. Not "button". + sb.assert_element('a:contains("Sign in")') + sb.assert_exact_text("You have been signed out!", "#top_message")