gridium 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gridium/version.rb +1 -1
- data/lib/page.rb +18 -4
- 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: bf7d9d1bcac31e36fda6bef78eaaaf9f833886cd
|
4
|
+
data.tar.gz: 9045c4caafa09133659f4ec8825dcc264436928e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d85c4eafeca504f387795108e992e4f8d44c9605f3f03729c48c9c3dc49c54fd1a5641ac38d322d2b8f4f0195e69bb8dd05b234b62c8216fb52494fcd6927385
|
7
|
+
data.tar.gz: f4fd979c9da4b62c497c8a001451bf1a6dc9c8ba8ab205f4bfd615ad74432fd74ccd4f97fbc56ef5bdf223aea38554e2a3287712a412a9e20b93324f61656aed
|
data/lib/gridium/version.rb
CHANGED
data/lib/page.rb
CHANGED
@@ -22,7 +22,7 @@ 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
|
26
26
|
return false
|
27
27
|
end
|
28
28
|
end
|
@@ -31,7 +31,7 @@ module Gridium
|
|
31
31
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
32
32
|
begin
|
33
33
|
wait.until {Driver.driver.find_element(:xpath, xpath).enabled?}
|
34
|
-
rescue Exception
|
34
|
+
rescue Exception
|
35
35
|
return false
|
36
36
|
end
|
37
37
|
end
|
@@ -40,7 +40,7 @@ module Gridium
|
|
40
40
|
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
41
41
|
begin
|
42
42
|
wait.until {Driver.driver.find_element(:link_text, linktext).enabled?}
|
43
|
-
rescue Exception
|
43
|
+
rescue Exception
|
44
44
|
return false
|
45
45
|
end
|
46
46
|
end
|
@@ -77,6 +77,20 @@ module Gridium
|
|
77
77
|
Driver.execute_script_driver(script)
|
78
78
|
end
|
79
79
|
|
80
|
+
def self.evaluate_script(script)
|
81
|
+
Driver.evaluate_script script
|
82
|
+
end
|
83
|
+
|
84
|
+
def self.wait_for_ajax
|
85
|
+
Timeout.timeout(Gridium.config.page_load_timeout) do
|
86
|
+
loop until jquery_loaded?
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
def self.jquery_loaded?
|
91
|
+
self.evaluate_script("jQuery.active").zero?
|
92
|
+
end
|
93
|
+
|
80
94
|
def all(by, locator)
|
81
95
|
Driver.driver.find_elements(by, locator)
|
82
96
|
end
|
@@ -98,7 +112,7 @@ module Gridium
|
|
98
112
|
button = Element.new("A #{button_name} button", :xpath, "//button[contains(., '#{button_name}')]")
|
99
113
|
begin
|
100
114
|
button.click
|
101
|
-
rescue Exception
|
115
|
+
rescue Exception
|
102
116
|
Log.debug("Button not found - Attempting Link - speed up test by using click_link method if this works...")
|
103
117
|
link = Element.new("A #{button_name} link", :xpath, "//a[contains(., '#{button_name}')]")
|
104
118
|
link.click
|
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: 0.1.
|
4
|
+
version: 0.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|