testcentricity_web 1.0.8 → 1.0.9
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/README.md +1 -1
- data/lib/testcentricity_web/elements/checkbox.rb +6 -1
- data/lib/testcentricity_web/environment.rb +9 -0
- data/lib/testcentricity_web/page_objects_helper.rb +18 -16
- data/lib/testcentricity_web/page_sections_helper.rb +18 -16
- data/lib/testcentricity_web/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c2fce4e4157c753c7d00c91f1063a9f855b9e40
|
4
|
+
data.tar.gz: c2f6194f08cc0fcf0ef4d0ec4f91e4713b879111
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b3ffbf956e542f1013ff06b290b36880646becd7854d72f57ece43d14796b64974a1f59792824338ee1a52c7e8039e734b5a01cc2d0a008f80ac037ff963af4
|
7
|
+
data.tar.gz: 4cf0af09af56f28f984d353b60049485a1ac6b2a83f8b822fada89b2a37a339e98e2e14d38d322a0d1e769bf17412d51ed6b127a6b5bcefc10a23681507d4c8e
|
data/README.md
CHANGED
@@ -587,7 +587,7 @@ Once your test environment is properly configured, the following **Environment V
|
|
587
587
|
`WEB_BROWSER` | Must be set to `appium`
|
588
588
|
`APP_PLATFORM_NAME` | Must be set to `iOS`
|
589
589
|
`APP_BROWSER` | Must be set to `Safari`
|
590
|
-
`APP_VERSION` | Must be set to `9.3`, `9.2`, or which ever iOS version you wish to run within the XCode Simulator
|
590
|
+
`APP_VERSION` | Must be set to `10.0`, `9.3`, `9.2`, or which ever iOS version you wish to run within the XCode Simulator
|
591
591
|
`APP_DEVICE` | Set to iOS device name supported by the iOS Simulator (`iPhone 6s Plus`, `iPad Pro`, `iPad Air 2`, etc.)
|
592
592
|
`ORIENTATION` | [Optional] Set to `portrait` or `landscape`
|
593
593
|
`APP_ALLOW_POPUPS` | [Optional] Allow javascript to open new windows in Safari. Set to `true` or `false`
|
@@ -45,7 +45,12 @@ module TestCentricity
|
|
45
45
|
object_not_found_exception(obj, 'Checkbox')
|
46
46
|
invalid_object_type_exception(obj, 'checkbox')
|
47
47
|
if @proxy.nil?
|
48
|
-
obj.
|
48
|
+
if obj.native.attribute('ot') == 'JCheckBox'
|
49
|
+
expected = state.to_bool
|
50
|
+
obj.click unless expected == obj.checked?
|
51
|
+
else
|
52
|
+
obj.set(state)
|
53
|
+
end
|
49
54
|
else
|
50
55
|
@proxy.click unless state == obj.checked?
|
51
56
|
end
|
@@ -33,6 +33,7 @@ module TestCentricity
|
|
33
33
|
attr_accessor :platform
|
34
34
|
attr_accessor :signed_in
|
35
35
|
attr_accessor :portal_status
|
36
|
+
attr_accessor :portal_context
|
36
37
|
attr_accessor :external_page
|
37
38
|
|
38
39
|
attr_accessor :protocol
|
@@ -138,6 +139,14 @@ module TestCentricity
|
|
138
139
|
@portal_status
|
139
140
|
end
|
140
141
|
|
142
|
+
def self.set_portal_context(portal_context)
|
143
|
+
@portal_context = portal_context
|
144
|
+
end
|
145
|
+
|
146
|
+
def self.portal_context
|
147
|
+
@portal_context
|
148
|
+
end
|
149
|
+
|
141
150
|
def self.set_external_page(state)
|
142
151
|
@external_page = state
|
143
152
|
end
|
@@ -19,7 +19,7 @@ module TestCentricity
|
|
19
19
|
define_method(trait_name.to_s, &block)
|
20
20
|
end
|
21
21
|
|
22
|
-
# Declare and instantiate a generic UI Element for this page object.
|
22
|
+
# Declare and instantiate a single generic UI Element for this page object.
|
23
23
|
#
|
24
24
|
# @param element_name [Symbol] name of UI object (as a symbol)
|
25
25
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -45,7 +45,7 @@ module TestCentricity
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
|
48
|
-
# Declare and instantiate a button UI Element for this page object.
|
48
|
+
# Declare and instantiate a single button UI Element for this page object.
|
49
49
|
#
|
50
50
|
# @param element_name [Symbol] name of button object (as a symbol)
|
51
51
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -71,7 +71,7 @@ module TestCentricity
|
|
71
71
|
end
|
72
72
|
end
|
73
73
|
|
74
|
-
# Declare and instantiate a text field UI Element for this page object.
|
74
|
+
# Declare and instantiate a single text field UI Element for this page object.
|
75
75
|
#
|
76
76
|
# @param element_name [Symbol] name of text field object (as a symbol)
|
77
77
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -99,7 +99,7 @@ module TestCentricity
|
|
99
99
|
end
|
100
100
|
end
|
101
101
|
|
102
|
-
# Declare and instantiate a checkbox UI Element for this page object.
|
102
|
+
# Declare and instantiate a single checkbox UI Element for this page object.
|
103
103
|
#
|
104
104
|
# @param element_name [Symbol] name of checkbox object (as a symbol)
|
105
105
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -127,7 +127,7 @@ module TestCentricity
|
|
127
127
|
end
|
128
128
|
end
|
129
129
|
|
130
|
-
# Declare and instantiate a radio button UI Element for this page object.
|
130
|
+
# Declare and instantiate a single radio button UI Element for this page object.
|
131
131
|
#
|
132
132
|
# @param element_name [Symbol] name of radio object (as a symbol)
|
133
133
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -155,7 +155,7 @@ module TestCentricity
|
|
155
155
|
end
|
156
156
|
end
|
157
157
|
|
158
|
-
# Declare and instantiate a label UI Element for this page object.
|
158
|
+
# Declare and instantiate a single label UI Element for this page object.
|
159
159
|
#
|
160
160
|
# @param element_name [Symbol] name of label object (as a symbol)
|
161
161
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -173,7 +173,7 @@ module TestCentricity
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
|
-
# Declare and instantiate a link UI Element for this page object.
|
176
|
+
# Declare and instantiate a single link UI Element for this page object.
|
177
177
|
#
|
178
178
|
# @param element_name [Symbol] name of link object (as a symbol)
|
179
179
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -191,7 +191,7 @@ module TestCentricity
|
|
191
191
|
end
|
192
192
|
end
|
193
193
|
|
194
|
-
# Declare and instantiate a table UI Element for this page object.
|
194
|
+
# Declare and instantiate a single table UI Element for this page object.
|
195
195
|
#
|
196
196
|
# @param element_name [Symbol] name of table object (as a symbol)
|
197
197
|
# @param locator [String] XPath expression that uniquely identifies object
|
@@ -208,7 +208,7 @@ module TestCentricity
|
|
208
208
|
end
|
209
209
|
end
|
210
210
|
|
211
|
-
# Declare and instantiate a select list UI Element for this page object.
|
211
|
+
# Declare and instantiate a single select list UI Element for this page object.
|
212
212
|
#
|
213
213
|
# @param element_name [Symbol] name of select list object (as a symbol)
|
214
214
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -226,7 +226,7 @@ module TestCentricity
|
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
229
|
-
# Declare and instantiate a list UI Element for this page object.
|
229
|
+
# Declare and instantiate a single list UI Element for this page object.
|
230
230
|
#
|
231
231
|
# @param element_name [Symbol] name of list object (as a symbol)
|
232
232
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -243,7 +243,7 @@ module TestCentricity
|
|
243
243
|
end
|
244
244
|
end
|
245
245
|
|
246
|
-
# Declare and instantiate an image UI Element for this page object.
|
246
|
+
# Declare and instantiate an single image UI Element for this page object.
|
247
247
|
#
|
248
248
|
# @param element_name [Symbol] name of image object (as a symbol)
|
249
249
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -261,7 +261,7 @@ module TestCentricity
|
|
261
261
|
end
|
262
262
|
end
|
263
263
|
|
264
|
-
# Declare and instantiate a File Field UI Element for this page object.
|
264
|
+
# Declare and instantiate a single File Field UI Element for this page object.
|
265
265
|
#
|
266
266
|
# @param element_name [Symbol] name of file field object (as a symbol)
|
267
267
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -272,7 +272,7 @@ module TestCentricity
|
|
272
272
|
class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::FileField.new(self, "#{locator}", :page);end))
|
273
273
|
end
|
274
274
|
|
275
|
-
# Instantiate a PageSection object for this page object.
|
275
|
+
# Instantiate a single PageSection object for this page object.
|
276
276
|
#
|
277
277
|
# @param section_name [Symbol] name of PageSection object (as a symbol)
|
278
278
|
# @param class_name [String] Class name of PageSection object
|
@@ -381,6 +381,10 @@ module TestCentricity
|
|
381
381
|
actual = ui_object.visible?
|
382
382
|
when :hidden
|
383
383
|
actual = ui_object.hidden?
|
384
|
+
when :width
|
385
|
+
actual = ui_object.get_width
|
386
|
+
when :height
|
387
|
+
actual = ui_object.get_height
|
384
388
|
when :readonly
|
385
389
|
actual = ui_object.read_only?
|
386
390
|
when :checked
|
@@ -485,9 +489,7 @@ module TestCentricity
|
|
485
489
|
else
|
486
490
|
case data_field.get_object_type
|
487
491
|
when :checkbox
|
488
|
-
|
489
|
-
data_field.set_siebel_checkbox_state(data_param.to_bool) :
|
490
|
-
data_field.set_checkbox_state(data_param.to_bool)
|
492
|
+
data_field.set_checkbox_state(data_param.to_bool)
|
491
493
|
when :selectlist
|
492
494
|
(data_field.get_siebel_object_type == 'JComboBox') ?
|
493
495
|
data_field.set("#{data_param}\t") :
|
@@ -27,7 +27,7 @@ module TestCentricity
|
|
27
27
|
define_method(trait_name.to_s, &block)
|
28
28
|
end
|
29
29
|
|
30
|
-
# Declare and instantiate a generic UI Element for this page section.
|
30
|
+
# Declare and instantiate a single generic UI Element for this page section.
|
31
31
|
#
|
32
32
|
# @param element_name [Symbol] name of UI object (as a symbol)
|
33
33
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -53,7 +53,7 @@ module TestCentricity
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
# Declare and instantiate a button UI Element for this page section.
|
56
|
+
# Declare and instantiate a single button UI Element for this page section.
|
57
57
|
#
|
58
58
|
# @param element_name [Symbol] name of button object (as a symbol)
|
59
59
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -79,7 +79,7 @@ module TestCentricity
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
-
# Declare and instantiate a text field UI Element for this page section.
|
82
|
+
# Declare and instantiate a single text field UI Element for this page section.
|
83
83
|
#
|
84
84
|
# @param element_name [Symbol] name of text field object (as a symbol)
|
85
85
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -107,7 +107,7 @@ module TestCentricity
|
|
107
107
|
end
|
108
108
|
end
|
109
109
|
|
110
|
-
# Declare and instantiate a checkbox UI Element for this page section.
|
110
|
+
# Declare and instantiate a single checkbox UI Element for this page section.
|
111
111
|
#
|
112
112
|
# @param element_name [Symbol] name of checkbox object (as a symbol)
|
113
113
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -135,7 +135,7 @@ module TestCentricity
|
|
135
135
|
end
|
136
136
|
end
|
137
137
|
|
138
|
-
# Declare and instantiate a radio button UI Element for this page section.
|
138
|
+
# Declare and instantiate a single radio button UI Element for this page section.
|
139
139
|
#
|
140
140
|
# @param element_name [Symbol] name of radio object (as a symbol)
|
141
141
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -163,7 +163,7 @@ module TestCentricity
|
|
163
163
|
end
|
164
164
|
end
|
165
165
|
|
166
|
-
# Declare and instantiate a label UI Element for this page section.
|
166
|
+
# Declare and instantiate a single label UI Element for this page section.
|
167
167
|
#
|
168
168
|
# @param element_name [Symbol] name of label object (as a symbol)
|
169
169
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -181,7 +181,7 @@ module TestCentricity
|
|
181
181
|
end
|
182
182
|
end
|
183
183
|
|
184
|
-
# Declare and instantiate a link UI Element for this page section.
|
184
|
+
# Declare and instantiate a single link UI Element for this page section.
|
185
185
|
#
|
186
186
|
# @param element_name [Symbol] name of link object (as a symbol)
|
187
187
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -199,7 +199,7 @@ module TestCentricity
|
|
199
199
|
end
|
200
200
|
end
|
201
201
|
|
202
|
-
# Declare and instantiate a table UI Element for this page section.
|
202
|
+
# Declare and instantiate a single table UI Element for this page section.
|
203
203
|
#
|
204
204
|
# @param element_name [Symbol] name of table object (as a symbol)
|
205
205
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -216,7 +216,7 @@ module TestCentricity
|
|
216
216
|
end
|
217
217
|
end
|
218
218
|
|
219
|
-
# Declare and instantiate a select list UI Element for this page section.
|
219
|
+
# Declare and instantiate a single select list UI Element for this page section.
|
220
220
|
#
|
221
221
|
# @param element_name [Symbol] name of select list object (as a symbol)
|
222
222
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -234,7 +234,7 @@ module TestCentricity
|
|
234
234
|
end
|
235
235
|
end
|
236
236
|
|
237
|
-
# Declare and instantiate a list UI Element for this page section.
|
237
|
+
# Declare and instantiate a single list UI Element for this page section.
|
238
238
|
#
|
239
239
|
# @param element_name [Symbol] name of list object (as a symbol)
|
240
240
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -251,7 +251,7 @@ module TestCentricity
|
|
251
251
|
end
|
252
252
|
end
|
253
253
|
|
254
|
-
# Declare and instantiate an image UI Element for this page section.
|
254
|
+
# Declare and instantiate an single image UI Element for this page section.
|
255
255
|
#
|
256
256
|
# @param element_name [Symbol] name of image object (as a symbol)
|
257
257
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -269,7 +269,7 @@ module TestCentricity
|
|
269
269
|
end
|
270
270
|
end
|
271
271
|
|
272
|
-
# Declare and instantiate a File Field UI Element for this page section.
|
272
|
+
# Declare and instantiate a single File Field UI Element for this page section.
|
273
273
|
#
|
274
274
|
# @param element_name [Symbol] name of file field object (as a symbol)
|
275
275
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
@@ -280,7 +280,7 @@ module TestCentricity
|
|
280
280
|
class_eval(%Q(def #{element_name.to_s};@#{element_name.to_s} ||= TestCentricity::FileField.new(self, "#{locator}", :section);end))
|
281
281
|
end
|
282
282
|
|
283
|
-
# Instantiate a PageSection object within this PageSection object.
|
283
|
+
# Instantiate a single PageSection object within this PageSection object.
|
284
284
|
#
|
285
285
|
# @param section_name [Symbol] name of PageSection object (as a symbol)
|
286
286
|
# @param class_name [String] Class name of PageSection object
|
@@ -447,6 +447,10 @@ module TestCentricity
|
|
447
447
|
actual = ui_object.visible?
|
448
448
|
when :hidden
|
449
449
|
actual = ui_object.hidden?
|
450
|
+
when :width
|
451
|
+
actual = ui_object.get_width
|
452
|
+
when :height
|
453
|
+
actual = ui_object.get_height
|
450
454
|
when :readonly
|
451
455
|
actual = ui_object.read_only?
|
452
456
|
when :checked
|
@@ -552,9 +556,7 @@ module TestCentricity
|
|
552
556
|
else
|
553
557
|
case data_field.get_object_type
|
554
558
|
when :checkbox
|
555
|
-
|
556
|
-
data_field.set_siebel_checkbox_state(data_param.to_bool) :
|
557
|
-
data_field.set_checkbox_state(data_param.to_bool)
|
559
|
+
data_field.set_checkbox_state(data_param.to_bool)
|
558
560
|
when :selectlist
|
559
561
|
(data_field.get_siebel_object_type == 'JComboBox') ?
|
560
562
|
data_field.set("#{data_param}\t") :
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: testcentricity_web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Mrozinski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|