-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathShoppingTestCase.robot
103 lines (81 loc) · 3.46 KB
/
ShoppingTestCase.robot
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
*** Settings ***
Library BuiltIn
Library MySeleniumLibrary.py
Suite Teardown end of test
*** Variables ***
${browser} chrome
${store_url} http://automationpractice.com
${store_url_validator} 0123-456-789
${women_section_validator} You will find here all woman fashion collections
${women_section_xpath} //a[contains(text(),'Women')]
${women_page_validator} You will find here all woman fashion collections.
${women_section_dresses_xpath} (//a[contains(text(),'Dresses')])[5]
${women_section_summer_dresses_xpath} (//a[contains(text(),'Summer Dresses')])[3]
${women_section_summer_validator} Short dress, long dress
${women_section_dresses_printed_chiffon_dress_xpath} //img[@alt='Printed Chiffon Dress']
${quick_view_string} Quick view
${quick_view_xpath} //div[@id='center_column']/ul/li[3]/div/div/div/a[2]
${proceed_to_check_out1_xpath} //div[4]/a/span
${proceed_to_check_out2_xpath} //div[3]/div/p[2]/a/span
${email_address} [email protected]
${first_name} myFirstName
${last_name} myLastName
${password} myPasswd
${address} 1234 My Address
${city} myCity
${postCode} 12345
${state} Florida
${country} United States
${mobilePhone} 1234567890
${submit_locator1} //button[@id='submitAccount']/span
${submit_locator2} //div[@id='center_column']/form/p/button/span
${submit_locator3} //form[@id='form']/p/button/span
${order_confirmation} Printed Chiffon Dress
*** Test Cases ***
Go to http://automationpractice.com and Check for Phone Number
go to web page http://automationpractice.com
look for text on the current page ${store_url_validator}
Click On The Women Section and Check for You will find here all woman fashion collections
click element ${women_section_xpath} xpath
look for text on the current page ${women_section_validator}
Click on Summer Dresses and Check for Short dress, long dress
click element ${women_section_dresses_xpath} xpath
click element ${women_section_summer_dresses_xpath} xpath
look for text on the current page ${women_section_summer_validator}
Mouse over Printed Chiffon Dress and Check for Quick View
mouse over locator ${women_section_dresses_printed_chiffon_dress_xpath} xpath
look for text on the current page ${quick_view_string}
click element ${quick_view_xpath} xpath
Add To Cart and Choose Medium Size
add to cart M
Click Proceed To Checkout
click element ${proceed_to_check_out1_xpath} xpath
click element ${proceed_to_check_out2_xpath} xpath
Type Emaill Address
create email ${email_address}
Type First Name
input first name ${first_name}
Type Last Name
input last name ${last_name}
Type Password
input password ${password}
Type Address
input address ${address}
Type City
input city ${city}
Type Post Code
input post code ${postCode}
Type State
input state ${state}
Type Country
input country ${country}
Type Mobile Phone
input phone number ${mobilePhone}
Proceed to Checkout
click element ${submit_locator1} xpath
click element ${submit_locator2} xpath
Accept Terms and Condition
accept terms and conditions
click element ${submit_locator3} xpath
Look for the order on the current page
look for text on the current page ${order_confirmation}