-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathtest_sb_fixture.py
More file actions
19 lines (15 loc) · 725 Bytes
/
Copy pathtest_sb_fixture.py
File metadata and controls
19 lines (15 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
# "sb" pytest fixture test in a method with no class
def test_sb_fixture_with_no_class(sb: BaseCase):
sb.goto("seleniumbase.io/help_docs/install/")
sb.type('input[aria-label="Search"]', "GUI Commander")
sb.click('mark:contains("Commander")')
sb.assert_title_contains("GUI / Commander")
# "sb" pytest fixture test in a method inside a class
class Test_SB_Fixture:
def test_sb_fixture_inside_class(self, sb: BaseCase):
sb.goto("seleniumbase.io/help_docs/install/")
sb.type('input[aria-label="Search"]', "GUI Commander")
sb.click('mark:contains("Commander")')
sb.assert_title_contains("GUI / Commander")