test_utils 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_utils/browser_tests/web_helper.rb +5 -5
- data/lib/test_utils/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6c538b8b269f5eedffbb8a1d4aee8d5fbd0fb01
|
4
|
+
data.tar.gz: 452eaeebcba3a2a3755a1f85c51e6ec377df96bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30ac831e705fed2ce058c507d7c96e452dc29b4cd05266899cd76cfd01e86162eed257398e25af67548fcc4e87dae2d0c7948e0f319afba5bed5d33862e5963
|
7
|
+
data.tar.gz: 94f4765e712e490497fef7b0956baa3ee1284294d441ea5bfb7c353711bf321fb6448d2604b8fdac5fe21e030cf846c01641b1bdcaa342c147ce2ddf9d7241c3
|
@@ -78,7 +78,7 @@ module WebHelper
|
|
78
78
|
# Wait until an element is visible
|
79
79
|
# Waits for presence and then waits for visibility
|
80
80
|
# Note: Use on watir elements
|
81
|
-
def wait_until_visible(element)
|
81
|
+
def wait_until_visible(element, timeout: 15)
|
82
82
|
begin
|
83
83
|
element.wait_until_present(timeout)
|
84
84
|
rescue Watir::Wait::TimeoutError
|
@@ -94,15 +94,15 @@ module WebHelper
|
|
94
94
|
# Clicks when an element is visible
|
95
95
|
# Waits for visibility (wait_until_visible) and then clicks on element
|
96
96
|
# Note: Use on watir elements
|
97
|
-
def click_when_visible(element)
|
98
|
-
wait_until_visible(element)
|
97
|
+
def click_when_visible(element, timeout: 15)
|
98
|
+
wait_until_visible(element, timeout)
|
99
99
|
element.click
|
100
100
|
end
|
101
101
|
|
102
102
|
# Wait until an element is visible
|
103
103
|
# Waits for visibility
|
104
104
|
# Note: Use on page object elements
|
105
|
-
def wait_until_visible_po(element)
|
105
|
+
def wait_until_visible_po(element, timeout: 15)
|
106
106
|
begin
|
107
107
|
Watir::Wait.until(timeout) {element.visible?}
|
108
108
|
rescue Watir::Wait::TimeoutError
|
@@ -124,7 +124,7 @@ module WebHelper
|
|
124
124
|
# Clicks when an element is visible
|
125
125
|
# Waits for visibility (wait_until_visible_po) and then clicks on element
|
126
126
|
# Note: Use on page object elements
|
127
|
-
def click_when_visible_po(element)
|
127
|
+
def click_when_visible_po(element, timeout: 15)
|
128
128
|
element.when_visible(timeout).click
|
129
129
|
end
|
130
130
|
|
data/lib/test_utils/version.rb
CHANGED