testcentricity_web 2.3.8 → 2.3.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 +6 -0
- data/lib/devices/devices.yml +4 -4
- data/lib/testcentricity_web/elements/select_list.rb +2 -0
- data/lib/testcentricity_web/page_objects_helper.rb +11 -3
- data/lib/testcentricity_web/page_sections_helper.rb +19 -7
- data/lib/testcentricity_web/ui_elements_helper.rb +12 -6
- 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: 10f5ee4ad3563f66f3c4c2895a7c524bbff3fb0e
|
4
|
+
data.tar.gz: 614dc46522cbe3adecf8b138e9d35a6958a474ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 410a61b8b112e2d188256b0dca4cdad552ae429c9a315b728a94e19ecf8476dcb6ebdbf150329c83495034665c4bbdd6e2f341ce7502d9a6207fa6c7d1bf7032
|
7
|
+
data.tar.gz: a39bc62386a55f49b6fb3d4e99b58c5eea93dd3a5d098d11de15a9c38ed683cb48ac518cf8c5a6e43517a51b44c536e0c127b4ccdbde6f5de346ac33b0cbdf96
|
data/README.md
CHANGED
@@ -27,6 +27,12 @@ hosted instances of Chrome, Firefox, Safari, and IE web browsers.
|
|
27
27
|
|
28
28
|
|
29
29
|
## What's New
|
30
|
+
###Version 2.3.9
|
31
|
+
|
32
|
+
* Updated `PageObject.populate_data_fields` and `PageSection.populate_data_fields` methods to accept optional `wait_time` parameter.
|
33
|
+
* Updated device profiles for iPhone 7 (iOS 10) with MS Edge browser, iPhone 7 (iOS 10) with Chrome browser, and iPhone 7 (iOS 10) with Firefox browser.
|
34
|
+
* Updated device profiles for iPad (iOS 10) with Chrome browser and iPad (iOS 10) with Firefox browser.
|
35
|
+
|
30
36
|
###Version 2.3.7
|
31
37
|
|
32
38
|
* Added `width`, `height`, `x`, `y`, and `displayed?` methods to `UIElement` class.
|
data/lib/devices/devices.yml
CHANGED
@@ -61,7 +61,7 @@
|
|
61
61
|
:css_width: 375
|
62
62
|
:css_height: 667
|
63
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/
|
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/64.0.3282.112 Mobile/14G60 Safari/602.1"
|
65
65
|
:iphone7_firefox:
|
66
66
|
:name: "iPhone 7 - Firefox"
|
67
67
|
:os: ios
|
@@ -69,7 +69,7 @@
|
|
69
69
|
:css_width: 375
|
70
70
|
:css_height: 667
|
71
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.
|
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.5b8741 Mobile/14G60 Safari/603.3.8"
|
73
73
|
:iphone7_edge:
|
74
74
|
:name: "iPhone 7 - MS Edge"
|
75
75
|
:os: ios
|
@@ -237,7 +237,7 @@ nexus6:
|
|
237
237
|
:css_width: 1024
|
238
238
|
:css_height: 768
|
239
239
|
:default_orientation: landscape
|
240
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) CriOS/
|
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/64.0.3282.112 Mobile/14G60 Safari/602.1"
|
241
241
|
:ipad_firefox:
|
242
242
|
:name: "iPad - Firefox"
|
243
243
|
:os: ios
|
@@ -245,7 +245,7 @@ nexus6:
|
|
245
245
|
:css_width: 1024
|
246
246
|
:css_height: 768
|
247
247
|
:default_orientation: landscape
|
248
|
-
:user_agent: "Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) FxiOS/10.
|
248
|
+
:user_agent: "Mozilla/5.0 (iPad; CPU OS 10_3_3 like Mac OS X) AppleWebKit/603.3.8 (KHTML, like Gecko) FxiOS/10.5b8741 Mobile/14G60 Safari/603.3.8"
|
249
249
|
:android_tablet:
|
250
250
|
:name: "Generic Android tablet"
|
251
251
|
:os: android
|
@@ -52,6 +52,8 @@ module TestCentricity
|
|
52
52
|
if option.is_a?(Hash)
|
53
53
|
page.find(:css, "li[class*='active-result']:nth-of-type(#{option[:index]})").click if option.has_key?(:index)
|
54
54
|
else
|
55
|
+
options = obj.all("li[class*='active-result']").collect(&:text)
|
56
|
+
sleep(2) unless options.include?(option)
|
55
57
|
first(:css, "li[class*='active-result']", text: option).click
|
56
58
|
end
|
57
59
|
end
|
@@ -613,9 +613,16 @@ module TestCentricity
|
|
613
613
|
# values must be in the form of a String for textfield and select list controls. For checkbox and radio buttons,
|
614
614
|
# data must either be a Boolean or a String that evaluates to a Boolean value (Yes, No, 1, 0, true, false).
|
615
615
|
#
|
616
|
+
# The optional wait_time parameter is used to specify the time (in seconds) to wait for each UI element to become
|
617
|
+
# visible before entering the associated data value. This option is useful in situations where entering data, or
|
618
|
+
# setting the state of a UI element might cause other UI elements to become visible or active. Specifying a wait_time
|
619
|
+
# value ensures that the subsequent UI elements will be ready to be interacted with as states are changed. If the wait
|
620
|
+
# time is nil, then the wait time will be 5 seconds.
|
621
|
+
#
|
616
622
|
# To delete all text content in a text field, pass !DELETE as the data to be entered.
|
617
623
|
#
|
618
624
|
# @param data [Hash] UI element(s) and associated data to be entered
|
625
|
+
# @param wait_time [Integer] wait time in seconds
|
619
626
|
# @example
|
620
627
|
# field_data = { prefix_select => 'Ms',
|
621
628
|
# first_name_field => 'Priscilla',
|
@@ -627,11 +634,12 @@ module TestCentricity
|
|
627
634
|
# }
|
628
635
|
# populate_data_fields(field_data)
|
629
636
|
#
|
630
|
-
def populate_data_fields(data)
|
637
|
+
def populate_data_fields(data, wait_time = nil)
|
638
|
+
timeout = wait_time.nil? ? 5 : wait_time
|
631
639
|
data.each do |data_field, data_param|
|
632
640
|
unless data_param.blank?
|
633
|
-
# make sure the intended UI target element
|
634
|
-
data_field.
|
641
|
+
# make sure the intended UI target element is visible before trying to set its value
|
642
|
+
data_field.wait_until_visible(timeout)
|
635
643
|
if data_param == '!DELETE'
|
636
644
|
data_field.clear
|
637
645
|
else
|
@@ -542,7 +542,8 @@ module TestCentricity
|
|
542
542
|
!visible?
|
543
543
|
end
|
544
544
|
|
545
|
-
# Wait until the Section object exists, or until the specified wait time has expired.
|
545
|
+
# Wait until the Section object exists, or until the specified wait time has expired. If the wait time is nil, then
|
546
|
+
# the wait time will be Capybara.default_max_wait_time.
|
546
547
|
#
|
547
548
|
# @param seconds [Integer or Float] wait time in seconds
|
548
549
|
# @example
|
@@ -556,7 +557,8 @@ module TestCentricity
|
|
556
557
|
raise "Could not find Section object '#{get_name}' (#{get_locator}) after #{timeout} seconds" unless exists?
|
557
558
|
end
|
558
559
|
|
559
|
-
# Wait until the Section object no longer exists, or until the specified wait time has expired.
|
560
|
+
# Wait until the Section object no longer exists, or until the specified wait time has expired. If the wait time is
|
561
|
+
# nil, then the wait time will be Capybara.default_max_wait_time.
|
560
562
|
#
|
561
563
|
# @param seconds [Integer or Float] wait time in seconds
|
562
564
|
# @example
|
@@ -570,7 +572,8 @@ module TestCentricity
|
|
570
572
|
raise "Section object '#{get_name}' (#{get_locator}) remained visible after #{timeout} seconds" if exists?
|
571
573
|
end
|
572
574
|
|
573
|
-
# Wait until the Section object is visible, or until the specified wait time has expired.
|
575
|
+
# Wait until the Section object is visible, or until the specified wait time has expired. If the wait time is nil,
|
576
|
+
# then the wait time will be Capybara.default_max_wait_time.
|
574
577
|
#
|
575
578
|
# @param seconds [Integer or Float] wait time in seconds
|
576
579
|
# @example
|
@@ -584,7 +587,8 @@ module TestCentricity
|
|
584
587
|
raise "Could not find Section object '#{get_name}' (#{get_locator}) after #{timeout} seconds" unless visible?
|
585
588
|
end
|
586
589
|
|
587
|
-
# Wait until the Section object is hidden, or until the specified wait time has expired.
|
590
|
+
# Wait until the Section object is hidden, or until the specified wait time has expired. If the wait time is nil,
|
591
|
+
# then the wait time will be Capybara.default_max_wait_time.
|
588
592
|
#
|
589
593
|
# @param seconds [Integer or Float] wait time in seconds
|
590
594
|
# @example
|
@@ -757,9 +761,16 @@ module TestCentricity
|
|
757
761
|
# and radio buttons, data must either be a Boolean or a String that evaluates to a Boolean value (Yes, No, 1,
|
758
762
|
# 0, true, false).
|
759
763
|
#
|
764
|
+
# The optional wait_time parameter is used to specify the time (in seconds) to wait for each UI element to become
|
765
|
+
# visible before entering the associated data value. This option is useful in situations where entering data, or
|
766
|
+
# setting the state of a UI element might cause other UI elements to become visible or active. Specifying a wait_time
|
767
|
+
# value ensures that the subsequent UI elements will be ready to be interacted with as states are changed. If the wait
|
768
|
+
# time is nil, then the wait time will be 5 seconds.
|
769
|
+
#
|
760
770
|
# To delete all text content in a text field, pass !DELETE as the data to be entered.
|
761
771
|
#
|
762
772
|
# @param data [Hash] UI element(s) and associated data to be entered
|
773
|
+
# @param wait_time [Integer] wait time in seconds
|
763
774
|
# @example
|
764
775
|
# data = { prefix_select => 'Mr.',
|
765
776
|
# first_name_field => 'Ignatious',
|
@@ -771,11 +782,12 @@ module TestCentricity
|
|
771
782
|
# }
|
772
783
|
# populate_data_fields(data)
|
773
784
|
#
|
774
|
-
def populate_data_fields(data)
|
785
|
+
def populate_data_fields(data, wait_time = nil)
|
786
|
+
timeout = wait_time.nil? ? 5 : wait_time
|
775
787
|
data.each do |data_field, data_param|
|
776
788
|
unless data_param.blank?
|
777
|
-
# make sure the intended UI target element
|
778
|
-
data_field.
|
789
|
+
# make sure the intended UI target element is visible before trying to set its value
|
790
|
+
data_field.wait_until_visible(timeout)
|
779
791
|
if data_param == '!DELETE'
|
780
792
|
data_field.clear
|
781
793
|
else
|
@@ -234,7 +234,8 @@ module TestCentricity
|
|
234
234
|
obj.disabled?
|
235
235
|
end
|
236
236
|
|
237
|
-
# Wait until the object exists, or until the specified wait time has expired.
|
237
|
+
# Wait until the object exists, or until the specified wait time has expired. If the wait time is nil, then the wait
|
238
|
+
# time will be Capybara.default_max_wait_time.
|
238
239
|
#
|
239
240
|
# @param seconds [Integer or Float] wait time in seconds
|
240
241
|
# @example
|
@@ -248,7 +249,8 @@ module TestCentricity
|
|
248
249
|
raise "Could not find UI #{object_ref_message} after #{timeout} seconds" unless exists?
|
249
250
|
end
|
250
251
|
|
251
|
-
# Wait until the object no longer exists, or until the specified wait time has expired.
|
252
|
+
# Wait until the object no longer exists, or until the specified wait time has expired. If the wait time is nil, then
|
253
|
+
# the wait time will be Capybara.default_max_wait_time.
|
252
254
|
#
|
253
255
|
# @param seconds [Integer or Float] wait time in seconds
|
254
256
|
# @example
|
@@ -262,7 +264,8 @@ module TestCentricity
|
|
262
264
|
raise "UI #{object_ref_message} remained visible after #{timeout} seconds" if exists?
|
263
265
|
end
|
264
266
|
|
265
|
-
# Wait until the object is visible, or until the specified wait time has expired.
|
267
|
+
# Wait until the object is visible, or until the specified wait time has expired. If the wait time is nil, then the
|
268
|
+
# wait time will be Capybara.default_max_wait_time.
|
266
269
|
#
|
267
270
|
# @param seconds [Integer or Float] wait time in seconds
|
268
271
|
# @example
|
@@ -276,7 +279,8 @@ module TestCentricity
|
|
276
279
|
raise "Could not find UI #{object_ref_message} after #{timeout} seconds" unless visible?
|
277
280
|
end
|
278
281
|
|
279
|
-
# Wait until the object is hidden, or until the specified wait time has expired.
|
282
|
+
# Wait until the object is hidden, or until the specified wait time has expired. If the wait time is nil, then the
|
283
|
+
# wait time will be Capybara.default_max_wait_time.
|
280
284
|
#
|
281
285
|
# @param seconds [Integer or Float] wait time in seconds
|
282
286
|
# @example
|
@@ -290,7 +294,8 @@ module TestCentricity
|
|
290
294
|
raise "UI #{object_ref_message} remained visible after #{timeout} seconds" if visible?
|
291
295
|
end
|
292
296
|
|
293
|
-
# Wait until the object's value equals the specified value, or until the specified wait time has expired.
|
297
|
+
# Wait until the object's value equals the specified value, or until the specified wait time has expired. If the wait
|
298
|
+
# time is nil, then the wait time will be Capybara.default_max_wait_time.
|
294
299
|
#
|
295
300
|
# @param seconds [Integer or Float] wait time in seconds
|
296
301
|
# @example
|
@@ -304,7 +309,8 @@ module TestCentricity
|
|
304
309
|
raise "Value of UI #{object_ref_message} failed to equal '#{value}' after #{timeout} seconds" unless get_value == value
|
305
310
|
end
|
306
311
|
|
307
|
-
# Wait until the object's value changes to a different value, or until the specified wait time has expired.
|
312
|
+
# Wait until the object's value changes to a different value, or until the specified wait time has expired. If the
|
313
|
+
# wait time is nil, then the wait time will be Capybara.default_max_wait_time.
|
308
314
|
#
|
309
315
|
# @param seconds [Integer or Float] wait time in seconds
|
310
316
|
# @example
|
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: 2.3.
|
4
|
+
version: 2.3.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: 2018-01-
|
11
|
+
date: 2018-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|