testcentricity 2.4.1 → 3.0.0

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.
Files changed (127) hide show
  1. checksums.yaml +5 -5
  2. data/.gitignore +29 -0
  3. data/.rspec +2 -1
  4. data/.rubocop.yml +38 -0
  5. data/.ruby-version +1 -1
  6. data/.simplecov +9 -0
  7. data/.yardopts +3 -0
  8. data/CHANGELOG.md +275 -0
  9. data/CODE_OF_CONDUCT.md +13 -0
  10. data/{LICENSE.txt → LICENSE.md} +3 -4
  11. data/README.md +938 -1378
  12. data/Rakefile +63 -1
  13. data/config/cucumber.yml +145 -0
  14. data/config/locales/en-US.yml +56 -0
  15. data/config/test_data/LOCAL_data.yml +11 -0
  16. data/config/test_data/data.yml +10 -0
  17. data/features/deep_links.feature +26 -0
  18. data/features/login.feature +30 -0
  19. data/features/navigation.feature +31 -0
  20. data/features/step_definitions/generic_steps.rb +72 -0
  21. data/features/support/android/screens/about_screen.rb +11 -0
  22. data/features/support/android/screens/base_app_screen.rb +29 -0
  23. data/features/support/android/screens/checkout_address_screen.rb +17 -0
  24. data/features/support/android/screens/checkout_payment_screen.rb +22 -0
  25. data/features/support/android/screens/login_screen.rb +18 -0
  26. data/features/support/android/screens/products_screen.rb +13 -0
  27. data/features/support/android/screens/saucebot_screen.rb +16 -0
  28. data/features/support/android/screens/webview_screen.rb +13 -0
  29. data/features/support/android/sections/nav_widgets/nav_menu.rb +39 -0
  30. data/features/support/env.rb +61 -0
  31. data/features/support/hooks.rb +135 -0
  32. data/features/support/ios/screens/about_screen.rb +11 -0
  33. data/features/support/ios/screens/base_app_screen.rb +19 -0
  34. data/features/support/ios/screens/checkout_address_screen.rb +17 -0
  35. data/features/support/ios/screens/checkout_payment_screen.rb +22 -0
  36. data/features/support/ios/screens/login_screen.rb +18 -0
  37. data/features/support/ios/screens/products_screen.rb +13 -0
  38. data/features/support/ios/screens/saucebot_screen.rb +16 -0
  39. data/features/support/ios/screens/webview_screen.rb +13 -0
  40. data/features/support/ios/sections/list_items/product_cell_item.rb +13 -0
  41. data/features/support/ios/sections/modals/base_modal.rb +23 -0
  42. data/features/support/ios/sections/modals/logout_modal.rb +6 -0
  43. data/features/support/ios/sections/modals/reset_app_state_modal.rb +6 -0
  44. data/features/support/ios/sections/nav_widgets/nav_bar.rb +31 -0
  45. data/features/support/ios/sections/nav_widgets/nav_menu.rb +41 -0
  46. data/features/support/shared_components/screens/base_app_screen.rb +31 -0
  47. data/features/support/shared_components/screens/checkout_address_screen.rb +17 -0
  48. data/features/support/shared_components/screens/checkout_payment_screen.rb +22 -0
  49. data/features/support/shared_components/screens/login_screen.rb +39 -0
  50. data/features/support/shared_components/screens/saucebot_screen.rb +17 -0
  51. data/features/support/shared_components/screens/webview_screen.rb +12 -0
  52. data/features/support/shared_components/sections/nav_menu.rb +58 -0
  53. data/features/support/world_data.rb +12 -0
  54. data/features/support/world_pages.rb +26 -0
  55. data/lib/testcentricity/app_core/appium_connect_helper.rb +355 -111
  56. data/lib/testcentricity/app_core/screen_object.rb +252 -0
  57. data/lib/testcentricity/app_core/screen_objects_helper.rb +29 -280
  58. data/lib/testcentricity/app_core/screen_section.rb +350 -0
  59. data/lib/testcentricity/app_elements/app_element_helper.rb +17 -8
  60. data/lib/testcentricity/app_elements/checkbox.rb +3 -3
  61. data/lib/testcentricity/data_objects/environment.rb +133 -39
  62. data/lib/testcentricity/version.rb +1 -1
  63. data/lib/testcentricity.rb +4 -129
  64. data/reports/.keep +1 -0
  65. data/spec/fixtures/page_object.rb +22 -0
  66. data/spec/fixtures/page_section_object.rb +21 -0
  67. data/spec/fixtures/screen_object.rb +16 -0
  68. data/spec/fixtures/screen_section_object.rb +16 -0
  69. data/spec/spec_helper.rb +28 -9
  70. data/spec/testcentricity/elements/button_spec.rb +18 -0
  71. data/spec/testcentricity/elements/checkbox_spec.rb +28 -0
  72. data/spec/testcentricity/elements/image_spec.rb +13 -0
  73. data/spec/testcentricity/elements/label_spec.rb +18 -0
  74. data/spec/testcentricity/elements/list_spec.rb +13 -0
  75. data/spec/testcentricity/elements/ui_element_spec.rb +72 -0
  76. data/spec/testcentricity/mobile/appium_connect_spec.rb +117 -0
  77. data/spec/testcentricity/mobile/screen_object_spec.rb +63 -0
  78. data/spec/testcentricity/mobile/screen_section_object_spec.rb +56 -0
  79. data/spec/testcentricity/version_spec.rb +7 -0
  80. data/spec/testcentricity/web/browser_spec.rb +41 -0
  81. data/spec/testcentricity/web/local_webdriver_spec.rb +86 -0
  82. data/spec/testcentricity/web/mobile_webdriver_spec.rb +123 -0
  83. data/spec/testcentricity/web/page_object_spec.rb +85 -0
  84. data/spec/testcentricity/web/page_section_object_spec.rb +72 -0
  85. data/testcentricity.gemspec +28 -27
  86. metadata +196 -127
  87. data/.ruby-gemset +0 -1
  88. data/Gemfile.lock +0 -93
  89. data/bin/console +0 -14
  90. data/bin/setup +0 -8
  91. data/lib/devices/devices.yml +0 -352
  92. data/lib/testcentricity/app_core/appium_server.rb +0 -69
  93. data/lib/testcentricity/app_core/screen_sections_helper.rb +0 -491
  94. data/lib/testcentricity/browser_helper.rb +0 -174
  95. data/lib/testcentricity/data_objects/data_objects_helper.rb +0 -78
  96. data/lib/testcentricity/data_objects/excel_helper.rb +0 -242
  97. data/lib/testcentricity/exception_queue_helper.rb +0 -111
  98. data/lib/testcentricity/utility_helpers.rb +0 -28
  99. data/lib/testcentricity/web_core/drag_drop_helper.rb +0 -15
  100. data/lib/testcentricity/web_core/page_objects_helper.rb +0 -711
  101. data/lib/testcentricity/web_core/page_sections_helper.rb +0 -932
  102. data/lib/testcentricity/web_core/webdriver_helper.rb +0 -588
  103. data/lib/testcentricity/web_elements/button.rb +0 -8
  104. data/lib/testcentricity/web_elements/cell_button.rb +0 -8
  105. data/lib/testcentricity/web_elements/cell_checkbox.rb +0 -38
  106. data/lib/testcentricity/web_elements/cell_element.rb +0 -69
  107. data/lib/testcentricity/web_elements/cell_image.rb +0 -8
  108. data/lib/testcentricity/web_elements/cell_radio.rb +0 -31
  109. data/lib/testcentricity/web_elements/checkbox.rb +0 -100
  110. data/lib/testcentricity/web_elements/file_field.rb +0 -45
  111. data/lib/testcentricity/web_elements/image.rb +0 -34
  112. data/lib/testcentricity/web_elements/label.rb +0 -8
  113. data/lib/testcentricity/web_elements/link.rb +0 -8
  114. data/lib/testcentricity/web_elements/list.rb +0 -100
  115. data/lib/testcentricity/web_elements/list_button.rb +0 -8
  116. data/lib/testcentricity/web_elements/list_checkbox.rb +0 -38
  117. data/lib/testcentricity/web_elements/list_element.rb +0 -61
  118. data/lib/testcentricity/web_elements/list_radio.rb +0 -31
  119. data/lib/testcentricity/web_elements/radio.rb +0 -74
  120. data/lib/testcentricity/web_elements/select_list.rb +0 -208
  121. data/lib/testcentricity/web_elements/siebel_open_ui_helper.rb +0 -15
  122. data/lib/testcentricity/web_elements/table.rb +0 -612
  123. data/lib/testcentricity/web_elements/textfield.rb +0 -114
  124. data/lib/testcentricity/web_elements/ui_elements_helper.rb +0 -532
  125. data/lib/testcentricity/world_extensions.rb +0 -26
  126. data/my_templates/default/method_details/setup.rb +0 -3
  127. data/spec/testcentricity_spec.rb +0 -9
@@ -1,352 +0,0 @@
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/65.0.3325.152 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.13.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: 360
110
- :css_height: 640
111
- :default_orientation: portrait
112
- :user_agent: "Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
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/65.0.3325.152 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
- :ipad_edge:
250
- :name: "iPad - MS Edge"
251
- :os: ios
252
- :type: tablet
253
- :css_width: 1024
254
- :css_height: 768
255
- :default_orientation: landscape
256
- :user_agent: "Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) EdgiOS/41.13.0.0 Mobile/14G60 Safari/603.3.8"
257
- :android_tablet:
258
- :name: "Generic Android tablet"
259
- :os: android
260
- :type: tablet
261
- :css_width: 1024
262
- :css_height: 768
263
- :default_orientation: landscape
264
- :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"
265
- :kindle_fire:
266
- :name: "Kindle Fire"
267
- :os: kindle
268
- :type: tablet
269
- :css_width: 1024
270
- :css_height: 600
271
- :default_orientation: landscape
272
- :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"
273
- :kindle_firehd7:
274
- :name: "Kindle Fire HD 7"
275
- :os: kindle
276
- :type: tablet
277
- :css_width: 800
278
- :css_height: 480
279
- :default_orientation: landscape
280
- :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"
281
- :kindle_firehd8:
282
- :name: "Kindle Fire HD 8 or 9"
283
- :os: kindle
284
- :type: tablet
285
- :css_width: 1280
286
- :css_height: 800
287
- :default_orientation: landscape
288
- :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"
289
- :kindle_firehd10:
290
- :name: "Kindle Fire HD 10"
291
- :os: kindle
292
- :type: tablet
293
- :css_width: 1920
294
- :css_height: 1200
295
- :default_orientation: landscape
296
- :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"
297
- :surface:
298
- :name: "Microsoft Surface"
299
- :os: windows
300
- :type: tablet
301
- :css_width: 1366
302
- :css_height: 768
303
- :default_orientation: landscape
304
- :user_agent: "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0; Touch)"
305
- :blackberry_playbook:
306
- :name: "Blackberry Playbook"
307
- :os: blackberry
308
- :type: tablet
309
- :css_width: 1024
310
- :css_height: 600
311
- :default_orientation: landscape
312
- :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+"
313
- :blackberry_passport:
314
- :name: "Blackberry Passport"
315
- :os: blackberry
316
- :type: tablet
317
- :css_width: 504
318
- :css_height: 504
319
- :default_orientation: portrait
320
- :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"
321
- :samsung_galaxy_tab:
322
- :name: "Samsung Galaxy Tab series"
323
- :os: android
324
- :type: tablet
325
- :css_width: 1280
326
- :css_height: 800
327
- :default_orientation: landscape
328
- :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"
329
- :google_nexus7:
330
- :name: "Nexus 7 series"
331
- :os: android
332
- :type: tablet
333
- :css_width: 960
334
- :css_height: 600
335
- :default_orientation: landscape
336
- :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"
337
- :google_nexus9:
338
- :name: "Nexus 9 series"
339
- :os: android
340
- :type: tablet
341
- :css_width: 1024
342
- :css_height: 768
343
- :default_orientation: landscape
344
- :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"
345
- :google_nexus10:
346
- :name: "Nexus 10 series"
347
- :os: android
348
- :type: tablet
349
- :css_width: 1280
350
- :css_height: 800
351
- :default_orientation: landscape
352
- :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"
@@ -1,69 +0,0 @@
1
- require 'childprocess'
2
-
3
- #
4
- # This class is designed to start and stop the Appium Server process. In order to use it you must have Appium
5
- # and node installed on your computer. You can pass parameters to Appium at startup via the constructor.
6
- #
7
- module TestCentricity
8
- class AppiumServer
9
-
10
- attr_accessor :process
11
-
12
- def initialize(params={})
13
- @params = params
14
- end
15
-
16
- #
17
- # Start the Appium Server
18
- #
19
- def start
20
- # terminate any currently running Appium Server
21
- if running?
22
- system('killall -9 node')
23
- puts 'Terminating existing Appium Server'
24
- sleep(5)
25
- puts 'Appium Server is being restarted'
26
- else
27
- puts 'Appium Server is being started'
28
- end
29
- # start new Appium Server
30
- @process = ChildProcess.build(*parameters)
31
- process.start
32
- # wait until confirmation that Appium Server is running
33
- wait = Selenium::WebDriver::Wait.new(timeout: 30)
34
- wait.until { running? }
35
- puts "Appium Server is running - PID = #{process.pid}"
36
- end
37
-
38
- #
39
- # Check to see if Appium Server is running
40
- #
41
- def running?
42
- response = nil
43
- begin
44
- response = Net::HTTP.get_response(URI('http://127.0.0.1:4723/wd/hub/sessions'))
45
- rescue
46
- end
47
- response && response.code_type == Net::HTTPOK
48
- end
49
-
50
- #
51
- # Stop the Appium Server
52
- #
53
- def stop
54
- process.stop
55
- puts 'Appium Server has been terminated'
56
- end
57
-
58
- private
59
-
60
- def parameters
61
- cmd = ['appium']
62
- @params.each do |key, value|
63
- cmd << '--' + key.to_s
64
- cmd << value.to_s if not value.nil? and value.size > 0
65
- end
66
- cmd
67
- end
68
- end
69
- end