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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 128a36730a47c9d8f3c6bed5def080fd4f8c1692
4
- data.tar.gz: ca6bcbdd9debb00d9b2ca31e27a15bdaba5897d0
3
+ metadata.gz: 64155d2259782f57944c79be0c7abc97f7f68414
4
+ data.tar.gz: 85dcd89af998ec330c62683c0ac24b4e93b52a4d
5
5
  SHA512:
6
- metadata.gz: 59820cb2977737c52b1f91fe657e3a3a7c7ea01746a6bac40095ffef1f7d0ad5eb67ed0e5391f90105e080446c1749cc6a093f0e94896fec8905ef13fbcc6acd
7
- data.tar.gz: cb4d201b778b91883ac4bd02f2cacc5b3feddc77579b55625a6ed74da1501bb7dfba81fdeae2fb7e6c0e1e9a32c06c4eb4c36f88da480be61737ced4943550bd
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
- @element.enabled?
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
 
@@ -1,3 +1,3 @@
1
1
  module Gridium
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/page.rb CHANGED
@@ -48,11 +48,25 @@ module Gridium
48
48
  end
49
49
 
50
50
  def self.has_text?(text)
51
- unless Driver.html.include? text
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
- else
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.2
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-06 00:00:00.000000000 Z
11
+ date: 2015-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler