gridium 0.1.12 → 0.1.13
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 +7 -9
- 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: 6fec07d25a93f098b5f9884acddaf67e9a9ccaed
|
4
|
+
data.tar.gz: 5a154126fe615efef0a449a076d1df2d71dbcb60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b116efab19c1c28cb8aa91a77657a491b45dbc015026a503de771092fe1ab4577c985d0672a66e53214f19276b251250e1bcf0a33e2c568647e72e416b8d6f4
|
7
|
+
data.tar.gz: 1e9167032c94306bddfe38a6ae1725d570f68235e73beaa30f0e23cbf383773c4452b600ef8bfd61ab848ca9997124ed64db33d8dbb11685b8a84ca86748956f
|
data/lib/gridium/version.rb
CHANGED
data/lib/page.rb
CHANGED
@@ -19,36 +19,34 @@ module Gridium
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.has_css?(css, options={})
|
22
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
22
23
|
begin
|
23
|
-
Driver.driver.find_element(:css, css).enabled?
|
24
|
+
wait.until {Driver.driver.find_element(:css, css).enabled?}
|
24
25
|
rescue Exception => e
|
25
26
|
return false
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
29
30
|
def self.has_xpath?(xpath, options={})
|
31
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
30
32
|
begin
|
31
|
-
Driver.driver.find_element(:xpath, xpath).enabled?
|
33
|
+
wait.until {Driver.driver.find_element(:xpath, xpath).enabled?}
|
32
34
|
rescue Exception => e
|
33
35
|
return false
|
34
36
|
end
|
35
37
|
end
|
36
38
|
|
37
39
|
def self.has_link?(linktext)
|
40
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
38
41
|
begin
|
39
|
-
Driver.driver.find_element(:link_text, linktext).enabled?
|
42
|
+
wait.until {Driver.driver.find_element(:link_text, linktext).enabled?}
|
40
43
|
rescue Exception => e
|
41
44
|
return false
|
42
45
|
end
|
43
46
|
end
|
44
47
|
|
45
48
|
def self.has_text?(text)
|
46
|
-
|
47
|
-
return true
|
48
|
-
else
|
49
|
-
Log.warn("Could not find expected text: #{text} on page.")
|
50
|
-
return false
|
51
|
-
end
|
49
|
+
has_flash?(text)
|
52
50
|
end
|
53
51
|
|
54
52
|
def self.has_flash?(text)
|
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.13
|
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-
|
11
|
+
date: 2016-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|