testcentricity_web 4.3.0 → 4.4.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +46 -11
- data/LICENSE.md +1 -1
- data/README.md +1931 -801
- data/lib/devices/devices.yml +144 -216
- data/lib/testcentricity_web/browser_helper.rb +33 -4
- data/lib/testcentricity_web/data_objects/environment.rb +96 -15
- data/lib/testcentricity_web/exception_queue_helper.rb +5 -6
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_object.rb +53 -49
- data/lib/testcentricity_web/web_core/page_objects_helper.rb +20 -11
- data/lib/testcentricity_web/web_core/page_section.rb +31 -34
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +416 -288
- data/lib/testcentricity_web/web_elements/audio.rb +6 -4
- data/lib/testcentricity_web/web_elements/button.rb +7 -4
- data/lib/testcentricity_web/web_elements/checkbox.rb +149 -147
- data/lib/testcentricity_web/web_elements/file_field.rb +38 -36
- data/lib/testcentricity_web/web_elements/image.rb +75 -70
- data/lib/testcentricity_web/web_elements/label.rb +6 -4
- data/lib/testcentricity_web/web_elements/link.rb +15 -13
- data/lib/testcentricity_web/web_elements/list.rb +171 -169
- data/lib/testcentricity_web/web_elements/media.rb +384 -379
- data/lib/testcentricity_web/web_elements/radio.rb +135 -133
- data/lib/testcentricity_web/web_elements/range.rb +16 -29
- data/lib/testcentricity_web/web_elements/select_list.rb +247 -245
- data/lib/testcentricity_web/web_elements/table.rb +575 -573
- data/lib/testcentricity_web/web_elements/textfield.rb +143 -139
- data/lib/testcentricity_web/web_elements/ui_element.rb +1171 -0
- data/lib/testcentricity_web/web_elements/video.rb +39 -37
- data/lib/testcentricity_web/world_extensions.rb +37 -4
- data/lib/testcentricity_web.rb +4 -23
- metadata +27 -79
- data/lib/testcentricity_web/web_elements/ui_elements_helper.rb +0 -1148
data/lib/devices/devices.yml
CHANGED
@@ -1,187 +1,211 @@
|
|
1
|
-
:
|
2
|
-
:name: "iPhone
|
3
|
-
:os: ios
|
4
|
-
:type: phone
|
5
|
-
:css_width: 375
|
6
|
-
:css_height: 667
|
7
|
-
:default_orientation: portrait
|
8
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1"
|
9
|
-
:iphone6_plus:
|
10
|
-
:name: "iPhone 6 Plus"
|
1
|
+
:iphone_11:
|
2
|
+
:name: "iPhone 11"
|
11
3
|
:os: ios
|
12
4
|
:type: phone
|
13
5
|
:css_width: 414
|
14
|
-
:css_height:
|
6
|
+
:css_height: 896
|
15
7
|
:default_orientation: portrait
|
16
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
17
|
-
:
|
18
|
-
:name: "iPhone
|
8
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
9
|
+
:iphone_11_pro:
|
10
|
+
:name: "iPhone 11 Pro"
|
19
11
|
:os: ios
|
20
12
|
:type: phone
|
21
13
|
:css_width: 375
|
22
|
-
:css_height:
|
14
|
+
:css_height: 812
|
23
15
|
:default_orientation: portrait
|
24
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
25
|
-
:
|
26
|
-
:name: "iPhone
|
16
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
17
|
+
:iphone_11_pro_max:
|
18
|
+
:name: "iPhone 11 Pro Max"
|
27
19
|
:os: ios
|
28
20
|
:type: phone
|
29
21
|
:css_width: 414
|
30
|
-
:css_height:
|
22
|
+
:css_height: 896
|
31
23
|
:default_orientation: portrait
|
32
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
33
|
-
:
|
34
|
-
:name: "iPhone
|
24
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
25
|
+
:iphone_12_mini:
|
26
|
+
:name: "iPhone 12 Mini"
|
35
27
|
:os: ios
|
36
28
|
:type: phone
|
37
29
|
:css_width: 375
|
38
|
-
:css_height:
|
39
|
-
:default_orientation: portrait
|
40
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/73.0.3683.68 Mobile/15E148 Safari/605.1"
|
41
|
-
:iphone7_firefox:
|
42
|
-
:name: "iPhone 7 - Firefox"
|
43
|
-
:os: ios
|
44
|
-
:type: phone
|
45
|
-
:css_width: 375
|
46
|
-
:css_height: 667
|
30
|
+
:css_height: 812
|
47
31
|
:default_orientation: portrait
|
48
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
49
|
-
:
|
50
|
-
:name: "iPhone
|
32
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
33
|
+
:iphone_12:
|
34
|
+
:name: "iPhone 12"
|
51
35
|
:os: ios
|
52
36
|
:type: phone
|
53
|
-
:css_width:
|
54
|
-
:css_height:
|
37
|
+
:css_width: 390
|
38
|
+
:css_height: 844
|
55
39
|
:default_orientation: portrait
|
56
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
57
|
-
:
|
58
|
-
:name: "iPhone
|
40
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
41
|
+
:iphone_12_pro:
|
42
|
+
:name: "iPhone 12 Pro"
|
59
43
|
:os: ios
|
60
44
|
:type: phone
|
61
|
-
:css_width:
|
62
|
-
:css_height:
|
45
|
+
:css_width: 390
|
46
|
+
:css_height: 844
|
63
47
|
:default_orientation: portrait
|
64
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
65
|
-
:
|
66
|
-
:name: "iPhone
|
48
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
49
|
+
:iphone_12_pro_max:
|
50
|
+
:name: "iPhone 12 Pro Max"
|
67
51
|
:os: ios
|
68
52
|
:type: phone
|
69
|
-
:css_width:
|
70
|
-
:css_height:
|
53
|
+
:css_width: 428
|
54
|
+
:css_height: 926
|
71
55
|
:default_orientation: portrait
|
72
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
73
|
-
:
|
74
|
-
:name: "iPhone
|
56
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
57
|
+
:iphone_13_mini:
|
58
|
+
:name: "iPhone 13 Mini"
|
75
59
|
:os: ios
|
76
60
|
:type: phone
|
77
61
|
:css_width: 375
|
78
62
|
:css_height: 812
|
79
63
|
:default_orientation: portrait
|
80
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
81
|
-
:
|
82
|
-
:name: "iPhone
|
64
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
65
|
+
:iphone_13:
|
66
|
+
:name: "iPhone 13"
|
83
67
|
:os: ios
|
84
68
|
:type: phone
|
85
|
-
:css_width:
|
86
|
-
:css_height:
|
69
|
+
:css_width: 390
|
70
|
+
:css_height: 844
|
87
71
|
:default_orientation: portrait
|
88
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
89
|
-
:
|
90
|
-
:name: "iPhone
|
72
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
73
|
+
:iphone_13_pro:
|
74
|
+
:name: "iPhone 13 Pro"
|
91
75
|
:os: ios
|
92
76
|
:type: phone
|
93
|
-
:css_width:
|
94
|
-
:css_height:
|
77
|
+
:css_width: 390
|
78
|
+
:css_height: 844
|
95
79
|
:default_orientation: portrait
|
96
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
97
|
-
:
|
98
|
-
:name: "iPhone
|
80
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
81
|
+
:iphone_13_pro_max:
|
82
|
+
:name: "iPhone 13 Pro Max"
|
99
83
|
:os: ios
|
100
84
|
:type: phone
|
101
|
-
:css_width:
|
102
|
-
:css_height:
|
85
|
+
:css_width: 428
|
86
|
+
:css_height: 926
|
103
87
|
:default_orientation: portrait
|
104
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
105
|
-
:
|
106
|
-
:name: "iPhone
|
88
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
89
|
+
:iphone_se:
|
90
|
+
:name: "iPhone SE"
|
107
91
|
:os: ios
|
108
92
|
:type: phone
|
109
|
-
:css_width:
|
110
|
-
:css_height:
|
93
|
+
:css_width: 375
|
94
|
+
:css_height: 667
|
111
95
|
:default_orientation: portrait
|
112
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
113
|
-
:
|
114
|
-
:name: "iPhone
|
96
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
97
|
+
:iphone_14:
|
98
|
+
:name: "iPhone 14"
|
115
99
|
:os: ios
|
116
100
|
:type: phone
|
117
|
-
:css_width:
|
118
|
-
:css_height:
|
101
|
+
:css_width: 390
|
102
|
+
:css_height: 844
|
119
103
|
:default_orientation: portrait
|
120
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
121
|
-
:
|
122
|
-
:name: "iPhone
|
104
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1"
|
105
|
+
:iphone_14_plus:
|
106
|
+
:name: "iPhone 14 Plus"
|
123
107
|
:os: ios
|
124
108
|
:type: phone
|
125
|
-
:css_width:
|
126
|
-
:css_height:
|
109
|
+
:css_width: 428
|
110
|
+
:css_height: 926
|
127
111
|
:default_orientation: portrait
|
128
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
129
|
-
:
|
130
|
-
:name: "iPhone
|
112
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1"
|
113
|
+
:iphone_14_pro:
|
114
|
+
:name: "iPhone 14 Pro"
|
131
115
|
:os: ios
|
132
116
|
:type: phone
|
133
|
-
:css_width:
|
134
|
-
:css_height:
|
117
|
+
:css_width: 393
|
118
|
+
:css_height: 852
|
135
119
|
:default_orientation: portrait
|
136
|
-
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS
|
137
|
-
|
138
|
-
:name: "
|
139
|
-
:os:
|
120
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1"
|
121
|
+
:iphone_14_pro_max:
|
122
|
+
:name: "iPhone 14 Pro Max"
|
123
|
+
:os: ios
|
140
124
|
:type: phone
|
141
|
-
:css_width:
|
142
|
-
:css_height:
|
125
|
+
:css_width: 430
|
126
|
+
:css_height: 932
|
143
127
|
:default_orientation: portrait
|
144
|
-
:user_agent: "Mozilla/5.0 (
|
145
|
-
:
|
146
|
-
:name: "
|
128
|
+
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 16_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Mobile/15E148 Safari/604.1"
|
129
|
+
:ipad:
|
130
|
+
:name: "iPad"
|
131
|
+
:os: ios
|
132
|
+
:type: tablet
|
133
|
+
:css_width: 1080
|
134
|
+
:css_height: 810
|
135
|
+
:default_orientation: landscape
|
136
|
+
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
|
137
|
+
:ipad_mini:
|
138
|
+
:name: "iPad Mini"
|
139
|
+
:os: ios
|
140
|
+
:type: tablet
|
141
|
+
:css_width: 1133
|
142
|
+
:css_height: 744
|
143
|
+
:default_orientation: landscape
|
144
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 15_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Mobile/15E148 Safari/604.1"
|
145
|
+
:ipad_air:
|
146
|
+
:name: "iPad Air"
|
147
|
+
:os: ios
|
148
|
+
:type: tablet
|
149
|
+
:css_width: 1180
|
150
|
+
:css_height: 820
|
151
|
+
:default_orientation: landscape
|
152
|
+
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
|
153
|
+
:ipad_pro_11:
|
154
|
+
:name: "iPad Pro 11 in."
|
155
|
+
:os: ios
|
156
|
+
:type: tablet
|
157
|
+
:css_width: 1194
|
158
|
+
:css_height: 834
|
159
|
+
:default_orientation: landscape
|
160
|
+
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
|
161
|
+
:ipad_pro_12_9:
|
162
|
+
:name: "iPad Pro 12.9 in."
|
163
|
+
:os: ios
|
164
|
+
:type: tablet
|
165
|
+
:css_width: 1366
|
166
|
+
:css_height: 1024
|
167
|
+
:default_orientation: landscape
|
168
|
+
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
|
169
|
+
pixel_5:
|
170
|
+
:name: "Pixel 5 phone"
|
147
171
|
:os: android
|
148
172
|
:type: phone
|
149
|
-
:css_width:
|
150
|
-
:css_height:
|
173
|
+
:css_width: 393
|
174
|
+
:css_height: 851
|
151
175
|
:default_orientation: portrait
|
152
|
-
:user_agent: "Mozilla/5.0 (Linux; Android
|
153
|
-
:
|
154
|
-
:name: "
|
176
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 12; sdk_gphone64_x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36"
|
177
|
+
pixel_6:
|
178
|
+
:name: "Pixel 6 phone"
|
155
179
|
:os: android
|
156
180
|
:type: phone
|
157
|
-
:css_width:
|
158
|
-
:css_height:
|
181
|
+
:css_width: 412
|
182
|
+
:css_height: 915
|
159
183
|
:default_orientation: portrait
|
160
|
-
:user_agent: "Mozilla/5.0 (Linux; Android
|
161
|
-
:
|
162
|
-
:name: "
|
184
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 12; sdk_gphone64_x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36"
|
185
|
+
pixel_xl:
|
186
|
+
:name: "Pixel XL phone"
|
163
187
|
:os: android
|
164
188
|
:type: phone
|
165
|
-
:css_width:
|
166
|
-
:css_height:
|
189
|
+
:css_width: 412
|
190
|
+
:css_height: 732
|
167
191
|
:default_orientation: portrait
|
168
|
-
:user_agent: "Mozilla/5.0 (Linux; Android
|
169
|
-
:
|
170
|
-
:name: "
|
192
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 12; sdk_gphone64_x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36"
|
193
|
+
:pixel_c:
|
194
|
+
:name: "Pixel C tablet"
|
171
195
|
:os: android
|
172
|
-
:type:
|
173
|
-
:css_width:
|
174
|
-
:css_height:
|
175
|
-
:default_orientation:
|
176
|
-
:user_agent: "Mozilla/5.0 (Linux; Android
|
177
|
-
:
|
178
|
-
:name: "
|
196
|
+
:type: tablet
|
197
|
+
:css_width: 1280
|
198
|
+
:css_height: 900
|
199
|
+
:default_orientation: landscape
|
200
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 12; sdk_gphone64_x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36"
|
201
|
+
:nexus_10:
|
202
|
+
:name: "Nexus 10 tablet"
|
179
203
|
:os: android
|
180
|
-
:type:
|
181
|
-
:css_width:
|
182
|
-
:css_height:
|
183
|
-
:default_orientation:
|
184
|
-
:user_agent: "Mozilla/5.0 (Linux; Android
|
204
|
+
:type: tablet
|
205
|
+
:css_width: 1280
|
206
|
+
:css_height: 800
|
207
|
+
:default_orientation: landscape
|
208
|
+
:user_agent: "Mozilla/5.0 (Linux; Android 12; sdk_gphone64_x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Mobile Safari/537.36"
|
185
209
|
:windows_phone8:
|
186
210
|
:name: "Generic Windows 8 phone"
|
187
211
|
:os: windows
|
@@ -230,70 +254,6 @@ nexus6:
|
|
230
254
|
:css_height: 640
|
231
255
|
:default_orientation: portrait
|
232
256
|
:user_agent: "Mozilla/5.0 (BB10; Touch) AppleWebKit/537.35+ (KHTML, like Gecko) Version/10.2.0.1791 Mobile Safari/537.35+"
|
233
|
-
:ipad:
|
234
|
-
:name: "iPad"
|
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 OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1"
|
241
|
-
:ipad_pro:
|
242
|
-
:name: "iPad Pro 12.9 in."
|
243
|
-
:os: ios
|
244
|
-
:type: tablet
|
245
|
-
:css_width: 1366
|
246
|
-
:css_height: 1024
|
247
|
-
:default_orientation: landscape
|
248
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Mobile/15E148 Safari/604.1"
|
249
|
-
:ipad_pro_10_5:
|
250
|
-
:name: "iPad Pro 10.5 in."
|
251
|
-
:os: ios
|
252
|
-
:type: tablet
|
253
|
-
:css_width: 1112
|
254
|
-
:css_height: 834
|
255
|
-
:default_orientation: landscape
|
256
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
|
257
|
-
:ipad_pro_11:
|
258
|
-
:name: "iPad Pro 11 in."
|
259
|
-
:os: ios
|
260
|
-
:type: tablet
|
261
|
-
:css_width: 1194
|
262
|
-
:css_height: 834
|
263
|
-
:default_orientation: landscape
|
264
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1 Mobile/15E148 Safari/604.1"
|
265
|
-
:ipad_pro_12_9:
|
266
|
-
:name: "iPad Pro 12.9 in. (3rd generation)"
|
267
|
-
:os: ios
|
268
|
-
:type: tablet
|
269
|
-
:css_width: 1366
|
270
|
-
:css_height: 1024
|
271
|
-
:default_orientation: landscape
|
272
|
-
:user_agent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Safari/605.1.15"
|
273
|
-
:ipad_chrome:
|
274
|
-
:name: "iPad - Chrome"
|
275
|
-
:os: ios
|
276
|
-
:type: tablet
|
277
|
-
:css_width: 1024
|
278
|
-
:css_height: 768
|
279
|
-
:default_orientation: landscape
|
280
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/73.0.3683.68 Mobile/15E148 Safari/605.1"
|
281
|
-
:ipad_firefox:
|
282
|
-
:name: "iPad - Firefox"
|
283
|
-
:os: ios
|
284
|
-
:type: tablet
|
285
|
-
:css_width: 1024
|
286
|
-
:css_height: 768
|
287
|
-
:default_orientation: landscape
|
288
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) FxiOS/16.0b14732 Mobile/15E148 Safari/605.1.15"
|
289
|
-
:ipad_edge:
|
290
|
-
:name: "iPad - MS Edge"
|
291
|
-
:os: ios
|
292
|
-
:type: tablet
|
293
|
-
:css_width: 1024
|
294
|
-
:css_height: 768
|
295
|
-
:default_orientation: landscape
|
296
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 EdgiOS/44.2.1 Mobile/15E148 Safari/605.1.15"
|
297
257
|
:kindle_fire:
|
298
258
|
:name: "Kindle Fire"
|
299
259
|
:os: kindle
|
@@ -350,35 +310,3 @@ nexus6:
|
|
350
310
|
:css_height: 504
|
351
311
|
:default_orientation: portrait
|
352
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"
|
353
|
-
:samsung_galaxy_tab:
|
354
|
-
:name: "Samsung Galaxy Tab series"
|
355
|
-
:os: android
|
356
|
-
:type: tablet
|
357
|
-
:css_width: 1280
|
358
|
-
:css_height: 800
|
359
|
-
:default_orientation: landscape
|
360
|
-
: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"
|
361
|
-
:google_nexus7:
|
362
|
-
:name: "Nexus 7 series"
|
363
|
-
:os: android
|
364
|
-
:type: tablet
|
365
|
-
:css_width: 960
|
366
|
-
:css_height: 600
|
367
|
-
:default_orientation: landscape
|
368
|
-
: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"
|
369
|
-
:google_nexus9:
|
370
|
-
:name: "Nexus 9 series"
|
371
|
-
:os: android
|
372
|
-
:type: tablet
|
373
|
-
:css_width: 1024
|
374
|
-
:css_height: 768
|
375
|
-
:default_orientation: landscape
|
376
|
-
: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"
|
377
|
-
:google_nexus10:
|
378
|
-
:name: "Nexus 10 series"
|
379
|
-
:os: android
|
380
|
-
:type: tablet
|
381
|
-
:css_width: 1280
|
382
|
-
:css_height: 800
|
383
|
-
:default_orientation: landscape
|
384
|
-
: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,4 +1,5 @@
|
|
1
1
|
require 'yaml'
|
2
|
+
require 'selenium-webdriver'
|
2
3
|
|
3
4
|
|
4
5
|
module TestCentricity
|
@@ -7,6 +8,33 @@ module TestCentricity
|
|
7
8
|
|
8
9
|
@devices = {}
|
9
10
|
|
11
|
+
# Scroll to bottom of page
|
12
|
+
#
|
13
|
+
# @example
|
14
|
+
# editor_page.scroll_to_bottom
|
15
|
+
#
|
16
|
+
def self.scroll_to_bottom
|
17
|
+
Capybara.page.execute_script "window.scrollTo(0, document.body.scrollHeight)"
|
18
|
+
end
|
19
|
+
|
20
|
+
# Scroll to top of page
|
21
|
+
#
|
22
|
+
# @example
|
23
|
+
# editor_page.scroll_to_top
|
24
|
+
#
|
25
|
+
def self.scroll_to_top
|
26
|
+
Capybara.page.execute_script "window.scrollTo(0, -document.body.scrollHeight)"
|
27
|
+
end
|
28
|
+
|
29
|
+
# Scroll to location
|
30
|
+
#
|
31
|
+
# @example
|
32
|
+
# editor_page.scroll_to(200, 400)
|
33
|
+
#
|
34
|
+
def self.scroll_to(x_loc, y_loc)
|
35
|
+
Capybara.page.execute_script "window.scrollBy(#{x_loc},#{y_loc})"
|
36
|
+
end
|
37
|
+
|
10
38
|
# Sets the size of the browser window.
|
11
39
|
#
|
12
40
|
# @param resolution [Array] the desired [width, height]
|
@@ -15,7 +43,7 @@ module TestCentricity
|
|
15
43
|
#
|
16
44
|
def self.set_browser_window_size(resolution)
|
17
45
|
resolution = resolution.split(',') if resolution.is_a?(String)
|
18
|
-
window = Capybara.
|
46
|
+
window = Capybara.page.driver.browser.manage.window
|
19
47
|
window.resize_to(resolution[0], resolution[1])
|
20
48
|
Environ.browser_size = [resolution[0].to_i, resolution[1].to_i]
|
21
49
|
end
|
@@ -26,7 +54,7 @@ module TestCentricity
|
|
26
54
|
# Browsers.maximize_browser
|
27
55
|
#
|
28
56
|
def self.maximize_browser
|
29
|
-
window = Capybara.
|
57
|
+
window = Capybara.page.driver.browser.manage.window
|
30
58
|
window.maximize
|
31
59
|
end
|
32
60
|
|
@@ -38,7 +66,7 @@ module TestCentricity
|
|
38
66
|
# Browsers.set_browser_window_position([100, 300])
|
39
67
|
#
|
40
68
|
def self.set_browser_window_position(x, y)
|
41
|
-
window = Capybara.
|
69
|
+
window = Capybara.page.driver.browser.manage.window
|
42
70
|
window.move_to(x, y)
|
43
71
|
end
|
44
72
|
|
@@ -131,6 +159,7 @@ module TestCentricity
|
|
131
159
|
|
132
160
|
def self.mobile_device_name(browser)
|
133
161
|
device = get_device(browser)
|
162
|
+
raise "Device '#{browser}' is not defined" unless device
|
134
163
|
name = device[:name]
|
135
164
|
raise "Device '#{device}' is not defined" unless name
|
136
165
|
Environ.device_os = device[:os]
|
@@ -146,7 +175,7 @@ module TestCentricity
|
|
146
175
|
default_orientation = device[:default_orientation].to_sym
|
147
176
|
if orientation
|
148
177
|
Environ.device_orientation = orientation
|
149
|
-
size = if orientation
|
178
|
+
size = if orientation == default_orientation
|
150
179
|
[width, height]
|
151
180
|
else
|
152
181
|
[height, width]
|