-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebshop.robot
More file actions
43 lines (37 loc) · 1.63 KB
/
Copy pathwebshop.robot
File metadata and controls
43 lines (37 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
*** Settings ***
Documentation Synthetic monitoring demo – Checkout flow (no payment)
Library Browser run_on_failure=Take A Screenshot
# Use the CryptoLibrary to handle encrypted passwords; password for the private key is
# read from the environment; fallback (do not use in production!) is robotmk
Library CryptoLibrary
... password=%{RF_CRYPT_PWD=robotmk}
... variable_decryption=True
... key_path=./keys
Resource Resources/authentication.resource
Resource Resources/catalog.resource
Resource Resources/cart.resource
Resource Resources/checkout.resource
Suite Setup Open Webshop
*** Variables ***
# https://github.com/testsmith-io/practice-software-testing
${BASE_URL} https://practicesoftwaretesting.com
${USER_EMAIL} customer3@practicesoftwaretesting.com
${USER_PASSWORD} crypt:+sGGKbSxC8zUzxUF/1Ag+WoUakwCqwRH/RiMDgbD21E607H4OrfLcBj0MKVpYDyrwq0So1WBOg==
${USER_NAME} Bob Smith
${ITEMS_IN_CART} 0
@{ITEMS_TO_ADD} Ear Protection Safety Goggles
*** Test Cases ***
User Can Reach Checkout Page
[Documentation] Test if a logged-in user can add items to the cart.
... Verify the cart items and perform the checkout.
authentication.Login As User ${USER_EMAIL} ${USER_PASSWORD} ${USER_NAME}
catalog.Add Items To Cart @{ITEMS_TO_ADD}
cart.Open Cart
checkout.Checkout
*** Keywords ***
Open Webshop
New Browser chromium headless=%{ROBOTMK_HEADLESS_HOST=false}
New Context locale=en-US viewport={ 'width': 1280, 'height': 1024 }
New Page ${BASE_URL}
Close Browser
Close Browser