-
Notifications
You must be signed in to change notification settings - Fork 0
/
UnitedTestScripts.py
179 lines (125 loc) · 5.87 KB
/
UnitedTestScripts.py
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
import time
from selenium import webdriver
from UnitedSelectorClass import United_Flight_Booking # import functionality
Test = United_Flight_Booking()
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('-incognito')
driver = webdriver.Chrome(r"C:\drivers\chromedriver.exe", options= chrome_options)
"""#Test Series 1: Testing that all elements on United.com's main page flight search can be selected and values can be entered/manipulated
"""
Test.open_United()
Test.main_advanced_search_button()
time.sleep(4)
Test.mileage_plus_yes_button()
time.sleep(2)
Test.mileage_plus_no_button()
"""Test.open_United() #begins test by opening website
time.sleep(2)
Test.book_with_miles_checkbox() #TCID #FS001 - can this checkbox be selected?
time.sleep(2)
Test.book_with_miles_checkbox() #unchecking the checkbox to proceed with the next test in this series
Test.oneway_radio_button() #TCID #FS002
time.sleep(2)
Test.roundtrip_radio_button() #TCID #FS003
time.sleep(2)
Test.calendar_shop_checkbox() #TCID #00009
time.sleep(2)
Test.calendar_shop_checkbox()#unchecking the checkbox to proceed with the next test in this series
Test.departing_airport_input_field()
time.sleep(2)
Test.destination_airport_input_field()
time.sleep(2)
Test.roundtrip_departing_date()
time.sleep(5)
Test.roundtrip_return_date()
time.sleep(2)
Test.roundtrip_calendar_left_scroll_button()
time.sleep(2)
Test.roundtrip_calendar_right_scroll_button()
time.sleep(2)
Test.roundtrip_return_date()
time.sleep(2)
Test.main_travelers_input_field()
time.sleep(2)
Test.main_travelers_context_menu_adults_input_field() #entering keystrokes directly into the Adults input field to change the number of Adult travelers rather than manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_clear_button() #clearing previous entry of Adult travelers
time.sleep(2)
Test.main_travelers_context_menu_adults_plus_button() #adding Adult travelers by manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_adults_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_adults_minus_button() #removing Adult travelers by manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_seniors_input_field() #entering keystrokes directly into the Seniors input field to change the number of Senior travelers rather than manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_seniors_plus_button() #adding Senior travelers by manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_seniors_minus_button() #removing Senior travelers by manipulating the GUI
time.sleep(2)
Test.main_travelers_context_menu_infants_input_field()
time.sleep(2)
Test.main_travelers_context_menu_infants_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_infants_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_clear_button()
Test.main_travelers_context_menu_children15_input_field()
time.sleep(2)
Test.main_travelers_context_menu_children15_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_children15_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_children15_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_clear_button()
time.sleep(2)
Test.main_travelers_context_menu_children12_input_field()
time.sleep(2)
Test.main_travelers_context_menu_children12_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_children12_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_children5_input_field()
time.sleep(2)
Test.main_travelers_context_menu_children5_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_children5_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_clear_button()
time.sleep(2)
Test.main_travelers_context_menu_children2_input_field()
time.sleep(2)
Test.main_travelers_context_menu_children2_plus_button()
time.sleep(2)
Test.main_travelers_context_menu_children2_minus_button()
time.sleep(2)
Test.main_travelers_context_menu_close_button()
time.sleep(2)
Test.main_fare_dropdown_()
time.sleep(2)
#TODO: Add selectors and tests for clicking the Advanced Search button, the Changed bag rules link, the optional services link, and the Find Flights button.
Test.close_browser()
"""#Test Series 2: Testing the feature with the following user variables: A single adult traveler purchasing a One Way ticket, basic Economy fare/cabin, Nonstop. No upgrades, no bundles. Meant to correspond to the flowchart United Test Series 2.
"""
Test.open_United() #begins test by opening website
Test.oneway_radio_button() #TCID #FS002
Test.departing_airport_input_field()
Test.destination_airport_input_field()
Test.roundtrip_departing_date_field()
Test.roundtrip_calendar_left_scroll_button()
Test.roundtrip_calendar_right_scroll_button()
Test.roundtrip_return_date_field()
Test.main_travelers_input_field()
Test.main_travelers_context_menu_adults_input_field() #entering keystrokes directly into the Adults input field to change the number of Adult travelers rather than manipulating the GUI
Test.main_travelers_context_menu_clear_button() #clearing previous entry of Adult travelers
Test.main_travelers_context_menu_adults_plus_button() #adding Adult travelers by manipulating the GUI
Test.main_travelers_context_menu_adults_plus_button()
Test.main_travelers_context_menu_adults_minus_button() #removing Adult travelers by manipulating the GUI
Test.main_travelers_context_menu_seniors_input_field() #entering keystrokes directly into the Seniors input field to change the number of Senior travelers rather than manipulating the GUI
Test.main_travelers_context_menu_seniors_plus_button() #adding Senior travelers by manipulating the GUI
Test.main_travelers_context_menu_seniors_minus_button() #removing Senior travelers by manipulating the GUI
Test.main_travelers_context_menu_infants_input_field()
Test.main_travelers_context_menu_infants_plus_button()
Test.main_travelers_context_menu_infants_minus_button()
Test.main_travelers_context_menu_close_button()"""