We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b15d208 commit 20403f2Copy full SHA for 20403f2
examples/boilerplates/samples/sb_swag_test.py
@@ -0,0 +1,18 @@
1
+""" Classic Page Object Model with the "sb" fixture """
2
+
3
4
+class LoginPage():
5
6
+ def login_to_swag_labs(self, sb, username):
7
+ sb.open("https://www.saucedemo.com/")
8
+ sb.type("#user-name", username)
9
+ sb.type("#password", "secret_sauce")
10
+ sb.click('input[type="submit"]')
11
12
13
+class MyTests():
14
15
+ def test_swag_labs_login(self, sb):
16
+ LoginPage().login_to_swag_labs(sb, "standard_user")
17
+ sb.assert_element("#inventory_container")
18
+ sb.assert_text("Products", "div.product_label")
0 commit comments