testcentricity_web 4.1.0 → 4.1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Gemfile.lock +112 -0
- data/README.md +548 -606
- data/lib/devices/devices.yml +0 -16
- data/lib/testcentricity_web/version.rb +1 -1
- data/lib/testcentricity_web/web_core/page_object.rb +12 -12
- data/lib/testcentricity_web/web_core/page_section.rb +14 -14
- data/lib/testcentricity_web/web_core/webdriver_helper.rb +194 -237
- data/test_site/test_page.html +11 -0
- data/testcentricity_web.gemspec +4 -5
- metadata +15 -9
- data/my_templates/default/method_details/setup.rb +0 -3
data/lib/devices/devices.yml
CHANGED
@@ -134,14 +134,6 @@
|
|
134
134
|
:css_height: 869
|
135
135
|
:default_orientation: portrait
|
136
136
|
:user_agent: "Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1"
|
137
|
-
:android_phone:
|
138
|
-
:name: "Generic Android phone"
|
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 4.2.1; en-us; Nexus 5 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19"
|
145
137
|
nexus6:
|
146
138
|
:name: "Nexus 6 or 6P phone"
|
147
139
|
:os: android
|
@@ -302,14 +294,6 @@ nexus6:
|
|
302
294
|
:css_height: 768
|
303
295
|
:default_orientation: landscape
|
304
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"
|
305
|
-
:android_tablet:
|
306
|
-
:name: "Generic Android tablet"
|
307
|
-
:os: android
|
308
|
-
:type: tablet
|
309
|
-
:css_width: 1024
|
310
|
-
:css_height: 768
|
311
|
-
:default_orientation: landscape
|
312
|
-
: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"
|
313
297
|
:kindle_fire:
|
314
298
|
:name: "Kindle Fire"
|
315
299
|
:os: kindle
|
@@ -39,9 +39,9 @@ module TestCentricity
|
|
39
39
|
#
|
40
40
|
# @param element_hash [Hash] names of buttons (as a symbol) and CSS selectors or XPath expressions that uniquely identifies buttons
|
41
41
|
# @example
|
42
|
-
# buttons new_account_button:
|
43
|
-
# save_button:
|
44
|
-
# cancel_button:
|
42
|
+
# buttons new_account_button: 'button#new-account',
|
43
|
+
# save_button: 'button#save',
|
44
|
+
# cancel_button: 'button#cancel'
|
45
45
|
#
|
46
46
|
def self.buttons(element_hash)
|
47
47
|
element_hash.each(&method(:button))
|
@@ -63,11 +63,11 @@ module TestCentricity
|
|
63
63
|
#
|
64
64
|
# @param element_hash [Hash] names of text fields (as a symbol) and CSS selectors or XPath expressions that uniquely identifies text fields
|
65
65
|
# @example
|
66
|
-
# textfields name_field:
|
67
|
-
# title_field:
|
68
|
-
# phone_field:
|
69
|
-
# fax_field:
|
70
|
-
# email_field:
|
66
|
+
# textfields name_field: 'input#Name',
|
67
|
+
# title_field: 'input#Title',
|
68
|
+
# phone_field: 'input#PhoneNumber',
|
69
|
+
# fax_field: 'input#FaxNumber',
|
70
|
+
# email_field: 'input#Email'
|
71
71
|
#
|
72
72
|
def self.textfields(element_hash)
|
73
73
|
element_hash.each(&method(:textfield))
|
@@ -112,10 +112,10 @@ module TestCentricity
|
|
112
112
|
#
|
113
113
|
# @param element_hash [Hash] names of checkboxes (as a symbol) and CSS selectors or XPath expressions that uniquely identifies checkboxes
|
114
114
|
# @example
|
115
|
-
# checkboxes hazmat_certified_check:
|
116
|
-
# epa_certified_check:
|
117
|
-
# dhs_certified_check:
|
118
|
-
# carb_compliant_check:
|
115
|
+
# checkboxes hazmat_certified_check: 'input#hazmatCertified',
|
116
|
+
# epa_certified_check: 'input#epaCertified',
|
117
|
+
# dhs_certified_check: 'input#homelandSecurityCertified',
|
118
|
+
# carb_compliant_check: 'input#carbCompliant'
|
119
119
|
#
|
120
120
|
def self.checkboxes(element_hash)
|
121
121
|
element_hash.each(&method(:checkbox))
|
@@ -124,8 +124,8 @@ module TestCentricity
|
|
124
124
|
# @param element_name [Symbol] name of UI object (as a symbol)
|
125
125
|
# @param locator [String] CSS selector or XPath expression that uniquely identifies object
|
126
126
|
# @example
|
127
|
-
# element :undo_record_item,
|
128
|
-
# element :basket_header,
|
127
|
+
# element :undo_record_item, "//li[@rn='Undo Record']/a"
|
128
|
+
# element :basket_header, 'div.basket_header'
|
129
129
|
#
|
130
130
|
def self.element(element_name, locator)
|
131
131
|
define_element(element_name, TestCentricity::UIElement, locator)
|
@@ -159,9 +159,9 @@ module TestCentricity
|
|
159
159
|
#
|
160
160
|
# @param element_hash [Hash] names of buttons (as a symbol) and CSS selectors or XPath expressions that uniquely identifies buttons
|
161
161
|
# @example
|
162
|
-
# buttons new_account_button:
|
163
|
-
# save_button:
|
164
|
-
# cancel_button:
|
162
|
+
# buttons new_account_button: 'button#new-account',
|
163
|
+
# save_button: 'button#save',
|
164
|
+
# cancel_button: 'button#cancel'
|
165
165
|
#
|
166
166
|
def self.buttons(element_hash)
|
167
167
|
element_hash.each(&method(:button))
|
@@ -183,11 +183,11 @@ module TestCentricity
|
|
183
183
|
#
|
184
184
|
# @param element_hash [Hash] names of text fields (as a symbol) and CSS selectors or XPath expressions that uniquely identifies text fields
|
185
185
|
# @example
|
186
|
-
# textfields name_field:
|
187
|
-
# title_field:
|
188
|
-
# phone_field:
|
189
|
-
# fax_field:
|
190
|
-
# email_field:
|
186
|
+
# textfields name_field: 'input#Name',
|
187
|
+
# title_field: 'input#Title',
|
188
|
+
# phone_field: 'input#PhoneNumber',
|
189
|
+
# fax_field: 'input#FaxNumber',
|
190
|
+
# email_field: 'input#Email'
|
191
191
|
#
|
192
192
|
def self.textfields(element_hash)
|
193
193
|
element_hash.each(&method(:textfield))
|
@@ -232,10 +232,10 @@ module TestCentricity
|
|
232
232
|
#
|
233
233
|
# @param element_hash [Hash] names of checkboxes (as a symbol) and CSS selectors or XPath expressions that uniquely identifies checkboxes
|
234
234
|
# @example
|
235
|
-
# checkboxes hazmat_certified_check:
|
236
|
-
# epa_certified_check:
|
237
|
-
# dhs_certified_check:
|
238
|
-
# carb_compliant_check:
|
235
|
+
# checkboxes hazmat_certified_check: 'input#hazmatCertified',
|
236
|
+
# epa_certified_check: 'input#epaCertified',
|
237
|
+
# dhs_certified_check: 'input#homelandSecurityCertified',
|
238
|
+
# carb_compliant_check: 'input#carbCompliant'
|
239
239
|
#
|
240
240
|
def self.checkboxes(element_hash)
|
241
241
|
element_hash.each(&method(:checkbox))
|