gridium 0.1.12 → 0.1.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gridium/version.rb +1 -1
  3. data/lib/page.rb +7 -9
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01f26b8f4ad718443ac4db320d2c0c04ae60a372
4
- data.tar.gz: f1d81db4d89c8a44d31e9347d3c8e4fbc9329da6
3
+ metadata.gz: 6fec07d25a93f098b5f9884acddaf67e9a9ccaed
4
+ data.tar.gz: 5a154126fe615efef0a449a076d1df2d71dbcb60
5
5
  SHA512:
6
- metadata.gz: 932fd24853e370002678db3877b62c7ed9cc38b8f316bda0f9fab313e99ac2079080521ad9f2f3dbdff01cbb00f3f2f8cd1beb77cc36c1da20954485887d208a
7
- data.tar.gz: 1d1545b9276358d7907dae7f5e2b2ac43a47ca2e285a67aed99134cc93a981a41e4b3b8a31d60f218bb9817115b8f1ca9d3499ab59282c9785f7f101589ae980
6
+ metadata.gz: 4b116efab19c1c28cb8aa91a77657a491b45dbc015026a503de771092fe1ab4577c985d0672a66e53214f19276b251250e1bcf0a33e2c568647e72e416b8d6f4
7
+ data.tar.gz: 1e9167032c94306bddfe38a6ae1725d570f68235e73beaa30f0e23cbf383773c4452b600ef8bfd61ab848ca9997124ed64db33d8dbb11685b8a84ca86748956f
@@ -1,3 +1,3 @@
1
1
  module Gridium
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
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
- if Driver.html.include?(text)
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.12
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-02-02 00:00:00.000000000 Z
11
+ date: 2016-03-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler