gridium 1.0.21 → 1.0.22
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/lib/page.rb +15 -6
- 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: 500dc7bbe01a1191f5d03a9b91da638409f44d83
|
4
|
+
data.tar.gz: 4f574bd829f86ebf2688905072870acc24a7e048
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86506fd685272bf11b6838320864eb1bbaba266a817859d0380306743223f0452b6d9d64a5d529c400758b48c8870463691ac3cd5494607e52ffe40ecd9ec1c1
|
7
|
+
data.tar.gz: 8194d98a9163d52e97386049d39c5b22aecbc1dc5180ff7e472aad64d502ccaff4e9ec68a6f53c1a9046d0e6d18096b7a7b34e0b06893adae89eb369b2b27e97
|
data/lib/page.rb
CHANGED
@@ -22,7 +22,8 @@ module Gridium
|
|
22
22
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
23
23
|
begin
|
24
24
|
wait.until {Driver.driver.find_element(:css, css).enabled?}
|
25
|
-
rescue Exception
|
25
|
+
rescue Exception => exception
|
26
|
+
Log.debug("[GRIDIUM::Page] has_css? is false because this exception was rescued: #{exception}")
|
26
27
|
return false
|
27
28
|
end
|
28
29
|
end
|
@@ -31,7 +32,8 @@ module Gridium
|
|
31
32
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
32
33
|
begin
|
33
34
|
wait.until {Driver.driver.find_element(:xpath, xpath).enabled?}
|
34
|
-
rescue Exception
|
35
|
+
rescue Exception => exception
|
36
|
+
Log.debug("[GRIDIUM::Page] has_xpath? is false because this exception was rescued: #{exception}")
|
35
37
|
return false
|
36
38
|
end
|
37
39
|
end
|
@@ -40,7 +42,8 @@ module Gridium
|
|
40
42
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
41
43
|
begin
|
42
44
|
wait.until {Driver.driver.find_element(:link_text, linktext).enabled?}
|
43
|
-
rescue Exception
|
45
|
+
rescue Exception => exception
|
46
|
+
Log.debug("[GRIDIUM::Page] has_link? is false because this exception was rescued: #{exception}")
|
44
47
|
return false
|
45
48
|
end
|
46
49
|
end
|
@@ -53,7 +56,8 @@ module Gridium
|
|
53
56
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5) #5 seconds every 500ms
|
54
57
|
begin
|
55
58
|
element = wait.until {Driver.html.include? text}
|
56
|
-
rescue
|
59
|
+
rescue Exception => exception
|
60
|
+
Log.debug("[GRIDIUM::Page] has_flash? exception was rescued: #{exception}")
|
57
61
|
Log.warn("Could not find the flash message!")
|
58
62
|
end
|
59
63
|
|
@@ -130,8 +134,8 @@ module Gridium
|
|
130
134
|
end
|
131
135
|
begin
|
132
136
|
button.click
|
133
|
-
rescue Exception
|
134
|
-
Log.debug("Button not found
|
137
|
+
rescue Exception => exception
|
138
|
+
Log.debug("[GRIDIUM::Page] Button not found and this exception was rescued: #{exception} Attempting Link - speed up test by using click_link method if this works...")
|
135
139
|
click_link button_name, link_index: button_index
|
136
140
|
end
|
137
141
|
end
|
@@ -140,4 +144,9 @@ module Gridium
|
|
140
144
|
Driver.driver.find_element(:id, id).click
|
141
145
|
end
|
142
146
|
end
|
147
|
+
|
148
|
+
def refresh
|
149
|
+
Driver.refresh
|
150
|
+
self.class.new
|
151
|
+
end
|
143
152
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gridium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|