โ€‹x
40
 
1
// ๐ŸŒ Lets load up the website
2
I.goTo("https://www.redcross.org/")
3
I.see("The Red Cross Mission At Work");
4
I.see("Emergency Preparedness")
5
โ€‹
6
// ๐Ÿ‘‰ Lets click on something
7
I.see("Be Prepared and Ready to Respond at Home and Your Workplace")
8
I.click("First Aid Kits")
9
โ€‹
10
// โฐ And see if it loads
11
I.amAt("https://www.redcross.org/store/first-aid-supplies")
12
โ€‹
13
// ๐Ÿ›’ Time to do some shopping!
14
I.click("Deluxe Family First Aid Kit")
15
I.fill("QTY", 2)
16
I.click("Add To Cart")
17
โ€‹
18
// ๐Ÿ˜Ž Lets check the cart
19
I.click("View Cart")
20
I.see("Order Subtotal")
21
โ€‹
22
// ๐Ÿค“ Btw you can use css selectors / id / xpath
23
// useful when duplicates occurs, instead of text
24
I.click(".mini-cart-link-cart")
25
โ€‹
26
// ๐Ÿ›‚ Lets check the cart
27
I.see("Shopping Cart")
28
I.see("Item No.: 321275")
29
โ€‹
30
// ๐Ÿ™ Lets be nice to the redcross folks, 
31
// and not submit the cart in production
32
// I.click("checkout")
33
โ€‹
34
//
35
// Interested to do more complex test scripts for your website?
36
// Head over to - https://uilicious.com
37
//
38
โ€‹
39
โ€‹
Test
1280 x 960
13 Apr 2019, 01:21 PM
Cart | Red Cross
SUCCESS. No errors.
41.7s
1.
I go to "https://www.redcross.org/" 7.8s
2.
I see "The Red Cross Mission At Work"
3.
I see "Emergency Preparedness"
4.
I see "Be Prepared and Ready to Respond at Home and Your Workplace"
5.
I click "First Aid Kits" 10.8s
6.
I am at "https://www.redcross.org/store/first-aid-supplies"
7.
I click "Deluxe Family First Aid Kit" 10.4s
8.
I fill "QTY": "2"
9.
I click "Add To Cart" 2.7s
10.
I click "View Cart" 2.2s
11.
I see "Order Subtotal"
12.
I click ".mini-cart-link-cart" 6.0s
13.
I see "Shopping Cart"
14.
I see "Item No.: 321275"
15.
[end of test]