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

Method test_swag_labs

integrations/node_js/my_first_test.py:5–25  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected