testcentricity_web 4.1.0 → 4.1.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 +13 -0
- data/README.md +202 -385
- 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/testcentricity_web.gemspec +4 -5
- metadata +13 -8
@@ -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))
|