MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / test_swag_labs

Method test_swag_labs

examples/my_first_test.py:7–29  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

5
6class MyTestClass(BaseCase):
7 def test_swag_labs(self):
8 self.goto("https://www.saucedemo.com")
9 self.type("#user-name", "standard_user")
10 self.type("#password", "secret_sauce\n")
11 self.assert_element("div.inventory_list")
12 self.assert_exact_text("Products", "span.title")
13 self.click('button[name*="backpack"]')
14 self.click("#shopping_cart_container a")
15 self.assert_exact_text("Your Cart", "span.title")
16 self.assert_text("Backpack", "div.cart_item")
17 self.click("button#checkout")
18 self.type("#first-name", "SeleniumBase")
19 self.type("#last-name", "Automation")
20 self.type("#postal-code", "77123")
21 self.click("input#continue")
22 self.assert_text("Checkout: Overview")
23 self.assert_text("Backpack", "div.cart_item")
24 self.assert_text("29.99", "div.inventory_item_price")
25 self.click("button#finish")
26 self.assert_exact_text("Thank you for your order!", "h2")
27 self.assert_element('img[alt="Pony Express"]')
28 self.js_click("a#logout_sidebar_link")
29 self.assert_element("div#login_button_container")
30
31
32#######################################################################

Callers 1

Calls 7

gotoMethod · 0.45
typeMethod · 0.45
assert_elementMethod · 0.45
assert_exact_textMethod · 0.45
clickMethod · 0.45
assert_textMethod · 0.45
js_clickMethod · 0.45

Tested by

no test coverage detected