gridium 1.1.23 → 1.1.24

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/element.rb +4 -0
  3. data/lib/page.rb +6 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 99d9a0327b2766d11841ca658aa1d89dacfeebaa
4
- data.tar.gz: 1a722adc617c41d31257a7e92aa1eb16839e1d87
3
+ metadata.gz: 5de1d40afe9f3ad0aa18c4ba6d832e7b631999f3
4
+ data.tar.gz: 72737f602a9367424e46e88c6ee6fccfb2033cbb
5
5
  SHA512:
6
- metadata.gz: d89cbb80dcaca9d578e5575621716a61d0e696b59939b85041d163a7ef5b4da295508504be504997364aeed004d24b5dbad58ed3e308cb05d79e8a9962da21e5
7
- data.tar.gz: 13b284321a6065f614b86d2e111c6d7129f4311be765ab27acff7067df715327978f69d4d892e9ecab8abc45906932fa8ac0a72d56db3a7cac26082bd262416f
6
+ metadata.gz: 0adc53ee7d638764b5eacdbde183d70c2e0332e1ddec21af49b1cdbda20ad5bd30429008526ab640bb4d6975c804f9b6ba6c54d70c6bbb1aaa8711d4d2cff682
7
+ data.tar.gz: c4deb07b0b3bba2838563ea8e6755a504474c108c0f881f420a66836334c92227f44e46921feb4b24fe70660de595288a2d3ab51b71cff24c266fc8207052932
data/lib/element.rb CHANGED
@@ -115,6 +115,10 @@ class Element
115
115
  element.enabled?
116
116
  end
117
117
 
118
+ def disabled?
119
+ !enabled?
120
+ end
121
+
118
122
  def clear
119
123
  element.clear
120
124
  sleep @text_padding_time
data/lib/page.rb CHANGED
@@ -66,7 +66,12 @@ module Gridium
66
66
 
67
67
  begin
68
68
  elem = Element.new("#{button_text} button", :xpath, "//button[contains(., \"#{button_text}\")]", timeout: timeout)
69
- wait.until {elem.enabled?}
69
+
70
+ if opts[:disabled]
71
+ wait.until {elem.disabled?}
72
+ else
73
+ wait.until {elem.enabled?}
74
+ end
70
75
  rescue Exception => exception
71
76
  Log.debug("[GRIDIUM::Page] has_button? is false because this exception was rescued: #{exception}")
72
77
  return false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gridium
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.23
4
+ version: 1.1.24
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Urban