gridium 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/element.rb +2 -1
- data/lib/gridium/version.rb +1 -1
- data/lib/page.rb +16 -2
- 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: 64155d2259782f57944c79be0c7abc97f7f68414
|
4
|
+
data.tar.gz: 85dcd89af998ec330c62683c0ac24b4e93b52a4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad9535717490cdeb9d140211afd0a4d346c75843352fe4d67463dbb6e883fe413af7eb43fe28efeab5e163eb103ce0778d975c04ab6e2dd0ee29e9be22a14ea
|
7
|
+
data.tar.gz: 1e8ca6a7be5f88c3ad3bd9281ac2334b62d8c1c8498e028431d5093922fc4d82d77e2d04656780894b122be25c66d9bde62222999849aaff40265ad83af24c0c
|
data/lib/element.rb
CHANGED
@@ -31,7 +31,7 @@ class Element
|
|
31
31
|
@element = element;
|
32
32
|
end
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
35
|
}
|
36
36
|
else
|
37
37
|
wait.until { @element = @driver.find_element(@by, @locator); Log.debug("Finding element #{self}..."); @element.enabled? }
|
@@ -170,6 +170,7 @@ class Element
|
|
170
170
|
end
|
171
171
|
|
172
172
|
def text= text
|
173
|
+
element.clear
|
173
174
|
element.send_keys text
|
174
175
|
end
|
175
176
|
|
data/lib/gridium/version.rb
CHANGED
data/lib/page.rb
CHANGED
@@ -48,11 +48,25 @@ module Gridium
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def self.has_text?(text)
|
51
|
-
|
51
|
+
if Driver.html.include? text
|
52
|
+
return true
|
53
|
+
else
|
52
54
|
Log.warn("Could not find expected text: #{text} on page.")
|
53
55
|
return false
|
54
|
-
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def self.has_flash?(text)
|
60
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5) #5 seconds every 500ms
|
61
|
+
begin
|
62
|
+
element = wait.until {Driver.html.include? text}
|
63
|
+
rescue
|
64
|
+
Log.warn("Could not find the flash message!")
|
65
|
+
end
|
66
|
+
if element
|
55
67
|
return true
|
68
|
+
else
|
69
|
+
return false
|
56
70
|
end
|
57
71
|
end
|
58
72
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Urban
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-08-
|
11
|
+
date: 2015-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|