testcentricity 2.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +93 -0
- data/LICENSE.txt +28 -0
- data/README.md +1634 -0
- data/Rakefile +1 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/devices/devices.yml +344 -0
- data/lib/testcentricity.rb +144 -0
- data/lib/testcentricity/app_core/appium_connect_helper.rb +154 -0
- data/lib/testcentricity/app_core/appium_server.rb +69 -0
- data/lib/testcentricity/app_core/screen_objects_helper.rb +180 -0
- data/lib/testcentricity/app_core/screen_sections_helper.rb +332 -0
- data/lib/testcentricity/app_elements/app_element_helper.rb +293 -0
- data/lib/testcentricity/app_elements/button.rb +8 -0
- data/lib/testcentricity/app_elements/checkbox.rb +20 -0
- data/lib/testcentricity/app_elements/label.rb +8 -0
- data/lib/testcentricity/app_elements/list.rb +25 -0
- data/lib/testcentricity/app_elements/switch.rb +20 -0
- data/lib/testcentricity/app_elements/textfield.rb +12 -0
- data/lib/testcentricity/browser_helper.rb +174 -0
- data/lib/testcentricity/data_objects/data_objects_helper.rb +78 -0
- data/lib/testcentricity/data_objects/environment.rb +281 -0
- data/lib/testcentricity/data_objects/excel_helper.rb +242 -0
- data/lib/testcentricity/exception_queue_helper.rb +51 -0
- data/lib/testcentricity/utility_helpers.rb +28 -0
- data/lib/testcentricity/version.rb +3 -0
- data/lib/testcentricity/web_core/drag_drop_helper.rb +15 -0
- data/lib/testcentricity/web_core/page_objects_helper.rb +669 -0
- data/lib/testcentricity/web_core/page_sections_helper.rb +866 -0
- data/lib/testcentricity/web_core/webdriver_helper.rb +579 -0
- data/lib/testcentricity/web_elements/button.rb +8 -0
- data/lib/testcentricity/web_elements/cell_button.rb +8 -0
- data/lib/testcentricity/web_elements/cell_checkbox.rb +38 -0
- data/lib/testcentricity/web_elements/cell_element.rb +69 -0
- data/lib/testcentricity/web_elements/cell_image.rb +8 -0
- data/lib/testcentricity/web_elements/cell_radio.rb +31 -0
- data/lib/testcentricity/web_elements/checkbox.rb +100 -0
- data/lib/testcentricity/web_elements/file_field.rb +45 -0
- data/lib/testcentricity/web_elements/image.rb +34 -0
- data/lib/testcentricity/web_elements/label.rb +8 -0
- data/lib/testcentricity/web_elements/link.rb +8 -0
- data/lib/testcentricity/web_elements/list.rb +73 -0
- data/lib/testcentricity/web_elements/list_button.rb +8 -0
- data/lib/testcentricity/web_elements/list_checkbox.rb +38 -0
- data/lib/testcentricity/web_elements/list_element.rb +61 -0
- data/lib/testcentricity/web_elements/list_radio.rb +31 -0
- data/lib/testcentricity/web_elements/radio.rb +74 -0
- data/lib/testcentricity/web_elements/select_list.rb +197 -0
- data/lib/testcentricity/web_elements/siebel_open_ui_helper.rb +15 -0
- data/lib/testcentricity/web_elements/table.rb +612 -0
- data/lib/testcentricity/web_elements/textfield.rb +114 -0
- data/lib/testcentricity/web_elements/ui_elements_helper.rb +502 -0
- data/lib/testcentricity/world_extensions.rb +26 -0
- data/my_templates/default/method_details/setup.rb +3 -0
- data/spec/spec_helper.rb +14 -0
- data/spec/testcentricity_spec.rb +9 -0
- data/testcentricity.gemspec +47 -0
- metadata +328 -0
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "testcentricity"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,344 @@
|
|
1
|
+
:iphone:
|
2
|
+
:name: "iPhone"
|
3
|
+
:os: ios
|
4
|
+
:type: phone
|
5
|
+
:css_width: 320
|
6
|
+
:css_height: 480
|
7
|
+
:default_orientation: portrait
|
8
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
|
9
|
+
:iphone4:
|
10
|
+
:name: "iPhone 4"
|
11
|
+
:os: ios
|
12
|
+
:type: phone
|
13
|
+
:css_width: 320
|
14
|
+
:css_height: 480
|
15
|
+
:default_orientation: portrait
|
16
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
|
17
|
+
:iphone5:
|
18
|
+
:name: "iPhone 5"
|
19
|
+
:os: ios
|
20
|
+
:type: phone
|
21
|
+
:css_width: 320
|
22
|
+
:css_height: 568
|
23
|
+
:default_orientation: portrait
|
24
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
|
25
|
+
:iphone6:
|
26
|
+
:name: "iPhone 6"
|
27
|
+
:os: ios
|
28
|
+
:type: phone
|
29
|
+
:css_width: 375
|
30
|
+
:css_height: 667
|
31
|
+
:default_orientation: portrait
|
32
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
|
33
|
+
:iphone6_plus:
|
34
|
+
:name: "iPhone 6 Plus"
|
35
|
+
:os: ios
|
36
|
+
:type: phone
|
37
|
+
:css_width: 414
|
38
|
+
:css_height: 736
|
39
|
+
:default_orientation: portrait
|
40
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
|
41
|
+
:iphone7:
|
42
|
+
:name: "iPhone 7"
|
43
|
+
:os: ios
|
44
|
+
:type: phone
|
45
|
+
:css_width: 375
|
46
|
+
:css_height: 667
|
47
|
+
:default_orientation: portrait
|
48
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.23 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602.1"
|
49
|
+
:iphone7_plus:
|
50
|
+
:name: "iPhone 7 Plus"
|
51
|
+
:os: ios
|
52
|
+
:type: phone
|
53
|
+
:css_width: 414
|
54
|
+
:css_height: 736
|
55
|
+
:default_orientation: portrait
|
56
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3 like Mac OS X) AppleWebKit/603.1.23 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602.1"
|
57
|
+
:iphone7_chrome:
|
58
|
+
:name: "iPhone 7 - Chrome"
|
59
|
+
:os: ios
|
60
|
+
:type: phone
|
61
|
+
:css_width: 375
|
62
|
+
:css_height: 667
|
63
|
+
:default_orientation: portrait
|
64
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) CriOS/64.0.3282.112 Mobile/14G60 Safari/602.1"
|
65
|
+
:iphone7_firefox:
|
66
|
+
:name: "iPhone 7 - Firefox"
|
67
|
+
:os: ios
|
68
|
+
:type: phone
|
69
|
+
:css_width: 375
|
70
|
+
:css_height: 667
|
71
|
+
:default_orientation: portrait
|
72
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/14G60 Safari/603.3.8"
|
73
|
+
:iphone7_edge:
|
74
|
+
:name: "iPhone 7 - MS Edge"
|
75
|
+
:os: ios
|
76
|
+
:type: phone
|
77
|
+
:css_width: 375
|
78
|
+
:css_height: 667
|
79
|
+
:default_orientation: portrait
|
80
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.0 EdgiOS/41.9.0.0 Mobile/14G60 Safari/603.3.8"
|
81
|
+
:iphone8:
|
82
|
+
:name: "iPhone 8"
|
83
|
+
:os: ios
|
84
|
+
:type: phone
|
85
|
+
:css_width: 375
|
86
|
+
:css_height: 667
|
87
|
+
:default_orientation: portrait
|
88
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
|
89
|
+
:iphone8_plus:
|
90
|
+
:name: "iPhone 8 Plus"
|
91
|
+
:os: ios
|
92
|
+
:type: phone
|
93
|
+
:css_width: 414
|
94
|
+
:css_height: 736
|
95
|
+
:default_orientation: portrait
|
96
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
|
97
|
+
:iphonex:
|
98
|
+
:name: "iPhone X"
|
99
|
+
:os: ios
|
100
|
+
:type: phone
|
101
|
+
:css_width: 375
|
102
|
+
:css_height: 812
|
103
|
+
:default_orientation: portrait
|
104
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
|
105
|
+
:android_phone:
|
106
|
+
:name: "Generic Android phone"
|
107
|
+
:os: android
|
108
|
+
:type: phone
|
109
|
+
:css_width: 320
|
110
|
+
:css_height: 480
|
111
|
+
:default_orientation: portrait
|
112
|
+
:user_agent: "Mozilla/5.0 (Linux; U; Android 4.0.1; en-us; sdk Build/ICS_MR0) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.30"
|
113
|
+
nexus6:
|
114
|
+
:name: "Nexus 6 or 6P phone"
|
115
|
+
:os: android
|
116
|
+
:type: phone
|
117
|
+
:css_width: 411
|
118
|
+
:css_height: 731
|
119
|
+
:default_orientation: portrait
|
120
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 6P Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.83 Mobile Safari/537.36"
|
121
|
+
:samsung_galaxy_s4:
|
122
|
+
:name: "Samsung Galaxy S4"
|
123
|
+
:os: android
|
124
|
+
:type: phone
|
125
|
+
:css_width: 360
|
126
|
+
:css_height: 640
|
127
|
+
:default_orientation: portrait
|
128
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 5.0.1; SAMSUNG SCH-I545 4G Build/LRX22C) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/2.1 Chrome/34.0.1847.76 Mobile Safari/537.36"
|
129
|
+
:samsung_galaxy_s5:
|
130
|
+
:name: "Samsung Galaxy S5"
|
131
|
+
:os: android
|
132
|
+
:type: phone
|
133
|
+
:css_width: 360
|
134
|
+
:css_height: 640
|
135
|
+
:default_orientation: portrait
|
136
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 6.0.1; SM-G900V Build/MMB29M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.98 Mobile Safari/537.36"
|
137
|
+
:samsung_galaxy_s6:
|
138
|
+
:name: "Samsung Galaxy S6 Edge"
|
139
|
+
:os: android
|
140
|
+
:type: phone
|
141
|
+
:css_width: 360
|
142
|
+
:css_height: 640
|
143
|
+
:default_orientation: portrait
|
144
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 6.0.1; SAMSUNG SM-G925F Build/MMB29K) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/4.0 Chrome/44.0.2403.133 Mobile Safari/537.36"
|
145
|
+
:pixel:
|
146
|
+
:name: "Google Pixel phone"
|
147
|
+
:os: android
|
148
|
+
:type: phone
|
149
|
+
:css_width: 411
|
150
|
+
:css_height: 731
|
151
|
+
:default_orientation: portrait
|
152
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 8.0.0; Pixel Build/OPP3.170518.006) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.66 Mobile Safari/537.36"
|
153
|
+
:pixel_xl:
|
154
|
+
:name: "Google Pixel XL phone"
|
155
|
+
:os: android
|
156
|
+
:type: phone
|
157
|
+
:css_width: 411
|
158
|
+
:css_height: 731
|
159
|
+
:default_orientation: portrait
|
160
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 8.0.0; Pixel XL Build/OPR6.170623.012) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36"
|
161
|
+
:windows_phone8:
|
162
|
+
:name: "Generic Windows 8 phone"
|
163
|
+
:os: windows
|
164
|
+
:type: phone
|
165
|
+
:css_width: 320
|
166
|
+
:css_height: 480
|
167
|
+
:default_orientation: portrait
|
168
|
+
:user_agent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 920)"
|
169
|
+
:windows_phone7:
|
170
|
+
:name: "Generic Windows 7 phone"
|
171
|
+
:os: windows
|
172
|
+
:type: phone
|
173
|
+
:css_width: 320
|
174
|
+
:css_height: 480
|
175
|
+
:default_orientation: portrait
|
176
|
+
:user_agent: "Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; NOKIA; Lumia 710)"
|
177
|
+
:lumia_950_xl:
|
178
|
+
:name: "Microsoft Lumia 950 XL"
|
179
|
+
:os: windows
|
180
|
+
:type: phone
|
181
|
+
:css_width: 360
|
182
|
+
:css_height: 640
|
183
|
+
:default_orientation: portrait
|
184
|
+
:user_agent: "Mozilla/5.0 (Windows Phone 10.0; Android 4.2; Microsoft; Lumia 950 XL) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Mobile Safari/537.36 Edge/12.10240"
|
185
|
+
:blackberry_z10:
|
186
|
+
:name: "Blackberry Z10"
|
187
|
+
:os: blackberry
|
188
|
+
:type: phone
|
189
|
+
:css_width: 384
|
190
|
+
:css_height: 640
|
191
|
+
:default_orientation: portrait
|
192
|
+
:user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+"
|
193
|
+
:blackberry_z30:
|
194
|
+
:name: "Blackberry Z30"
|
195
|
+
:os: blackberry
|
196
|
+
:type: phone
|
197
|
+
:css_width: 360
|
198
|
+
:css_height: 640
|
199
|
+
:default_orientation: portrait
|
200
|
+
:user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.10+ (KHTML, like Gecko) Version/10.0.9.2372 Mobile Safari/537.10+"
|
201
|
+
:blackberry_leap:
|
202
|
+
:name: "Blackberry Leap"
|
203
|
+
:os: blackberry
|
204
|
+
:type: phone
|
205
|
+
:css_width: 360
|
206
|
+
:css_height: 640
|
207
|
+
:default_orientation: portrait
|
208
|
+
:user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.2.0.1791 Mobile Safari/537.35+"
|
209
|
+
:ipad:
|
210
|
+
:name: "iPad"
|
211
|
+
:os: ios
|
212
|
+
:type: tablet
|
213
|
+
:css_width: 1024
|
214
|
+
:css_height: 768
|
215
|
+
:default_orientation: landscape
|
216
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 10_3 like Mac OS X) AppleWebKit/603.1.23 (KHTML, like Gecko) Version/10.0 Mobile/14E5239e Safari/602.1"
|
217
|
+
:ipad_pro:
|
218
|
+
:name: "iPad Pro"
|
219
|
+
:os: ios
|
220
|
+
:type: tablet
|
221
|
+
:css_width: 1366
|
222
|
+
:css_height: 1024
|
223
|
+
:default_orientation: landscape
|
224
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
|
225
|
+
:ipad_pro_10_5:
|
226
|
+
:name: "iPad Pro 10.5 in."
|
227
|
+
:os: ios
|
228
|
+
:type: tablet
|
229
|
+
:css_width: 1112
|
230
|
+
:css_height: 834
|
231
|
+
:default_orientation: landscape
|
232
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 11_0 like Mac OS X) AppleWebKit/604.1.25 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1"
|
233
|
+
:ipad_chrome:
|
234
|
+
:name: "iPad - Chrome"
|
235
|
+
:os: ios
|
236
|
+
:type: tablet
|
237
|
+
:css_width: 1024
|
238
|
+
:css_height: 768
|
239
|
+
:default_orientation: landscape
|
240
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) CriOS/64.0.3282.112 Mobile/14G60 Safari/602.1"
|
241
|
+
:ipad_firefox:
|
242
|
+
:name: "iPad - Firefox"
|
243
|
+
:os: ios
|
244
|
+
:type: tablet
|
245
|
+
:css_width: 1024
|
246
|
+
:css_height: 768
|
247
|
+
:default_orientation: landscape
|
248
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU iPhone OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) FxiOS/10.6b8836 Mobile/14G60 Safari/603.3.8"
|
249
|
+
:android_tablet:
|
250
|
+
:name: "Generic Android tablet"
|
251
|
+
:os: android
|
252
|
+
:type: tablet
|
253
|
+
:css_width: 1024
|
254
|
+
:css_height: 768
|
255
|
+
:default_orientation: landscape
|
256
|
+
:user_agent: "Mozilla/5.0 (Linux; U; Android 3.0; en-us; GT-P7100 Build/HRI83) AppleWebkit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"
|
257
|
+
:kindle_fire:
|
258
|
+
:name: "Kindle Fire"
|
259
|
+
:os: kindle
|
260
|
+
:type: tablet
|
261
|
+
:css_width: 1024
|
262
|
+
:css_height: 600
|
263
|
+
:default_orientation: landscape
|
264
|
+
:user_agent: "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.0.141.16-Gen4_11004310) AppleWebkit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true"
|
265
|
+
:kindle_firehd7:
|
266
|
+
:name: "Kindle Fire HD 7"
|
267
|
+
:os: kindle
|
268
|
+
:type: tablet
|
269
|
+
:css_width: 800
|
270
|
+
:css_height: 480
|
271
|
+
:default_orientation: landscape
|
272
|
+
:user_agent: "Mozilla/5.0 (Linux; U; en-us; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"
|
273
|
+
:kindle_firehd8:
|
274
|
+
:name: "Kindle Fire HD 8 or 9"
|
275
|
+
:os: kindle
|
276
|
+
:type: tablet
|
277
|
+
:css_width: 1280
|
278
|
+
:css_height: 800
|
279
|
+
:default_orientation: landscape
|
280
|
+
:user_agent: "Mozilla/5.0 (Linux; U; en-us; KFAPWI Build/JDQ39) AppleWebKit/535.19 (KHTML, like Gecko) Silk/3.13 Safari/535.19 Silk-Accelerated=true"
|
281
|
+
:kindle_firehd10:
|
282
|
+
:name: "Kindle Fire HD 10"
|
283
|
+
:os: kindle
|
284
|
+
:type: tablet
|
285
|
+
:css_width: 1920
|
286
|
+
:css_height: 1200
|
287
|
+
:default_orientation: landscape
|
288
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 5.1.1; KFTBWI Build/LMY47O) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/41.51020.2250.0238 Safari/537.36"
|
289
|
+
:surface:
|
290
|
+
:name: "Microsoft Surface"
|
291
|
+
:os: windows
|
292
|
+
:type: tablet
|
293
|
+
:css_width: 1366
|
294
|
+
:css_height: 768
|
295
|
+
:default_orientation: landscape
|
296
|
+
:user_agent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)"
|
297
|
+
:blackberry_playbook:
|
298
|
+
:name: "Blackberry Playbook"
|
299
|
+
:os: blackberry
|
300
|
+
:type: tablet
|
301
|
+
:css_width: 1024
|
302
|
+
:css_height: 600
|
303
|
+
:default_orientation: landscape
|
304
|
+
:user_agent: "Mozilla/5.0 (PlayBook; U; RIM Tablet OS 2.1.0; en-US) AppleWebKit/536.2+ (KHTML like Gecko) Version/7.2.1.0 Safari/536.2+"
|
305
|
+
:blackberry_passport:
|
306
|
+
:name: "Blackberry Passport"
|
307
|
+
:os: blackberry
|
308
|
+
:type: tablet
|
309
|
+
:css_width: 504
|
310
|
+
:css_height: 504
|
311
|
+
:default_orientation: portrait
|
312
|
+
:user_agent: "Mozilla/5.0 (Linux; U; Android 4.3; en-us; Passport Build/10.3.2.148) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 Safari/534.30"
|
313
|
+
:samsung_galaxy_tab:
|
314
|
+
:name: "Samsung Galaxy Tab series"
|
315
|
+
:os: android
|
316
|
+
:type: tablet
|
317
|
+
:css_width: 1280
|
318
|
+
:css_height: 800
|
319
|
+
:default_orientation: landscape
|
320
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 4.0.4; GT-P6800 Build/IMM76D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36"
|
321
|
+
:google_nexus7:
|
322
|
+
:name: "Nexus 7 series"
|
323
|
+
:os: android
|
324
|
+
:type: tablet
|
325
|
+
:css_width: 960
|
326
|
+
:css_height: 600
|
327
|
+
:default_orientation: landscape
|
328
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 4.4.4; Nexus 7 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.111 Safari/537.36"
|
329
|
+
:google_nexus9:
|
330
|
+
:name: "Nexus 9 series"
|
331
|
+
:os: android
|
332
|
+
:type: tablet
|
333
|
+
:css_width: 1024
|
334
|
+
:css_height: 768
|
335
|
+
:default_orientation: landscape
|
336
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 5.1.1; Nexus 9 Build/LMY48I) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.84 Safari/537.36"
|
337
|
+
:google_nexus10:
|
338
|
+
:name: "Nexus 10 series"
|
339
|
+
:os: android
|
340
|
+
:type: tablet
|
341
|
+
:css_width: 1280
|
342
|
+
:css_height: 800
|
343
|
+
:default_orientation: landscape
|
344
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 5.1; Nexus 10 Build/LMY47D) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.109 Safari/537.36"
|
@@ -0,0 +1,144 @@
|
|
1
|
+
require 'capybara/cucumber'
|
2
|
+
require 'test/unit'
|
3
|
+
require 'capybara/poltergeist'
|
4
|
+
|
5
|
+
require 'testcentricity/world_extensions'
|
6
|
+
require 'testcentricity/exception_queue_helper'
|
7
|
+
require 'testcentricity/utility_helpers'
|
8
|
+
require 'testcentricity/version'
|
9
|
+
require 'testcentricity/browser_helper'
|
10
|
+
|
11
|
+
require 'testcentricity/web_core/drag_drop_helper'
|
12
|
+
require 'testcentricity/web_core/page_objects_helper'
|
13
|
+
require 'testcentricity/web_core/page_sections_helper'
|
14
|
+
require 'testcentricity/web_core/webdriver_helper'
|
15
|
+
|
16
|
+
require 'testcentricity/data_objects/data_objects_helper'
|
17
|
+
require 'testcentricity/data_objects/environment'
|
18
|
+
require 'testcentricity/data_objects/excel_helper'
|
19
|
+
|
20
|
+
require 'testcentricity/web_elements/ui_elements_helper'
|
21
|
+
require 'testcentricity/web_elements/siebel_open_ui_helper'
|
22
|
+
require 'testcentricity/web_elements/button'
|
23
|
+
require 'testcentricity/web_elements/checkbox'
|
24
|
+
require 'testcentricity/web_elements/file_field'
|
25
|
+
require 'testcentricity/web_elements/image'
|
26
|
+
require 'testcentricity/web_elements/label'
|
27
|
+
require 'testcentricity/web_elements/link'
|
28
|
+
require 'testcentricity/web_elements/radio'
|
29
|
+
require 'testcentricity/web_elements/select_list'
|
30
|
+
require 'testcentricity/web_elements/list'
|
31
|
+
require 'testcentricity/web_elements/table'
|
32
|
+
require 'testcentricity/web_elements/textfield'
|
33
|
+
require 'testcentricity/web_elements/cell_element'
|
34
|
+
require 'testcentricity/web_elements/cell_button'
|
35
|
+
require 'testcentricity/web_elements/cell_checkbox'
|
36
|
+
require 'testcentricity/web_elements/cell_radio'
|
37
|
+
require 'testcentricity/web_elements/cell_image'
|
38
|
+
require 'testcentricity/web_elements/list_element'
|
39
|
+
require 'testcentricity/web_elements/list_button'
|
40
|
+
require 'testcentricity/web_elements/list_checkbox'
|
41
|
+
require 'testcentricity/web_elements/list_radio'
|
42
|
+
|
43
|
+
require 'testcentricity/app_core/appium_server'
|
44
|
+
require 'testcentricity/app_core/appium_connect_helper'
|
45
|
+
require 'testcentricity/app_core/screen_objects_helper'
|
46
|
+
require 'testcentricity/app_core/screen_sections_helper'
|
47
|
+
|
48
|
+
require 'testcentricity/app_elements/app_element_helper'
|
49
|
+
require 'testcentricity/app_elements/button'
|
50
|
+
require 'testcentricity/app_elements/checkbox'
|
51
|
+
require 'testcentricity/app_elements/label'
|
52
|
+
require 'testcentricity/app_elements/switch'
|
53
|
+
require 'testcentricity/app_elements/textfield'
|
54
|
+
require 'testcentricity/app_elements/list'
|
55
|
+
|
56
|
+
|
57
|
+
module TestCentricity
|
58
|
+
class PageManager
|
59
|
+
attr_accessor :current_page
|
60
|
+
|
61
|
+
@page_objects = {}
|
62
|
+
|
63
|
+
def self.register_page_objects(pages)
|
64
|
+
result = ''
|
65
|
+
pages.each do |page_object, page_class|
|
66
|
+
obj = page_class.new
|
67
|
+
@page_objects[page_object] = obj unless @page_objects.has_key?(page_object)
|
68
|
+
page_names = obj.page_name
|
69
|
+
page_names = Array(page_names) if page_names.is_a? String
|
70
|
+
page_names.each do |name|
|
71
|
+
page_key = name.gsub(/\s+/, '').downcase.to_sym
|
72
|
+
if page_key != page_object
|
73
|
+
@page_objects[page_key] = obj unless @page_objects.has_key?(page_key)
|
74
|
+
end
|
75
|
+
result = "#{result}def #{page_object};@#{page_object} ||= TestCentricity::PageManager.find_page(:#{page_object});end;"
|
76
|
+
end
|
77
|
+
end
|
78
|
+
result
|
79
|
+
end
|
80
|
+
|
81
|
+
# Have all PageObjects been registered?
|
82
|
+
#
|
83
|
+
# @return [Boolean] true if all PageObjects have been registered
|
84
|
+
# @example
|
85
|
+
# TestCentricity::PageManager.loaded?
|
86
|
+
#
|
87
|
+
def self.loaded?
|
88
|
+
!@page_objects.empty?
|
89
|
+
end
|
90
|
+
|
91
|
+
def self.find_page(page_name)
|
92
|
+
(page_name.is_a? String) ? page_id = page_name.gsub(/\s+/, '').downcase.to_sym : page_id = page_name
|
93
|
+
@page_objects[page_id]
|
94
|
+
end
|
95
|
+
|
96
|
+
# Get the currently active PageObject
|
97
|
+
#
|
98
|
+
# @return [PageObject]
|
99
|
+
# @example
|
100
|
+
# active_page = TestCentricity::PageManager.current_page
|
101
|
+
#
|
102
|
+
def self.current_page
|
103
|
+
@current_page
|
104
|
+
end
|
105
|
+
|
106
|
+
# Sets the currently active PageObject
|
107
|
+
#
|
108
|
+
# @param page [PageObject] Reference to the active PageObject
|
109
|
+
# @example
|
110
|
+
# TestCentricity::PageManager.current_page = product_search_page
|
111
|
+
#
|
112
|
+
def self.current_page=(page)
|
113
|
+
@current_page = page
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
117
|
+
|
118
|
+
class DataManager
|
119
|
+
@data_objects = {}
|
120
|
+
|
121
|
+
def self.register_data_objects(data)
|
122
|
+
result = ''
|
123
|
+
data.each do |data_type, data_class|
|
124
|
+
@data_objects[data_type] = data_class.new unless @data_objects.has_key?(data_type)
|
125
|
+
result = "#{result}def #{data_type};@#{data_type} ||= TestCentricity::DataManager.find_data_object(:#{data_type});end;"
|
126
|
+
end
|
127
|
+
result
|
128
|
+
end
|
129
|
+
|
130
|
+
def self.find_data_object(data_object)
|
131
|
+
@data_objects[data_object]
|
132
|
+
end
|
133
|
+
|
134
|
+
# Have all DataObjects been registered?
|
135
|
+
#
|
136
|
+
# @return [Boolean] true if all DataObjects have been registered
|
137
|
+
# @example
|
138
|
+
# TestCentricity::DataManager.loaded?
|
139
|
+
#
|
140
|
+
def self.loaded?
|
141
|
+
!@data_objects.empty?
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|