watir 6.8.1 → 6.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/lib/watir/after_hooks.rb +1 -1
- data/lib/watir/wait/timer.rb +4 -2
- data/spec/watirspec/after_hooks_spec.rb +7 -11
- data/spec/watirspec/wait_spec.rb +17 -0
- data/watir.gemspec +1 -1
- 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: 727cd5c1020e932467833d4750dc61716f60b8fb
|
4
|
+
data.tar.gz: b0e81b12faace42be3914ef54de2b1d25fddb4cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ba07e681cc33793a02bd6a1deff4419bdff895374d7329bb3c55a6c83e820bc9456b56fc4d80ffc2dc9079760615311119b90e5ef76e774f6b85ffc0a506f38
|
7
|
+
data.tar.gz: bee368388abe7453cd081bfd55c7f8e9e2417016230a373b3451ea89b48ac49b2ce9ce4e6015ebf8a9540dccf96c484e3a5eb1da741f0c8c0d5a39316d91adfc
|
data/CHANGES.md
CHANGED
data/lib/watir/after_hooks.rb
CHANGED
data/lib/watir/wait/timer.rb
CHANGED
@@ -2,8 +2,6 @@ module Watir
|
|
2
2
|
module Wait
|
3
3
|
class Timer
|
4
4
|
|
5
|
-
attr_reader :remaining_time
|
6
|
-
|
7
5
|
def initialize(timeout: nil)
|
8
6
|
@end_time = current_time + timeout if timeout
|
9
7
|
@remaining_time = @end_time - current_time if @end_time
|
@@ -25,6 +23,10 @@ module Watir
|
|
25
23
|
end
|
26
24
|
end
|
27
25
|
|
26
|
+
def remaining_time
|
27
|
+
@end_time - current_time
|
28
|
+
end
|
29
|
+
|
28
30
|
def reset!
|
29
31
|
@end_time = nil
|
30
32
|
end
|
@@ -125,21 +125,17 @@ describe "Browser::AfterHooks" do
|
|
125
125
|
end
|
126
126
|
|
127
127
|
not_compliant_on :safari, :headless do
|
128
|
-
it "
|
129
|
-
|
130
|
-
@page_after_hook = Proc.new { browser.url }
|
131
|
-
browser.after_hooks.add @page_after_hook
|
132
|
-
browser.goto url
|
128
|
+
it "does not run error checks with alert present" do
|
129
|
+
browser.goto WatirSpec.url_for("alerts.html")
|
133
130
|
|
134
|
-
|
135
|
-
|
136
|
-
end
|
131
|
+
@page_after_hook = Proc.new { @yield = browser.title == "Alerts" }
|
132
|
+
browser.after_hooks.add @page_after_hook
|
137
133
|
|
138
|
-
|
139
|
-
|
140
|
-
end
|
134
|
+
browser.button(id: "alert").click
|
135
|
+
expect(@yield).to be_nil
|
141
136
|
|
142
137
|
browser.alert.ok
|
138
|
+
expect(@yield).to eq true
|
143
139
|
end
|
144
140
|
end
|
145
141
|
|
data/spec/watirspec/wait_spec.rb
CHANGED
@@ -144,6 +144,23 @@ describe Watir::Element do
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
+
compliant_on :relaxed_locate do
|
148
|
+
it "clicking automatically waits until the element appears" do
|
149
|
+
browser.a(id: 'show_bar').click
|
150
|
+
expect { browser.div(id: 'bar').click }.to_not raise_exception
|
151
|
+
expect(browser.div(id: 'bar').text).to eq 'changed'
|
152
|
+
end
|
153
|
+
|
154
|
+
it "raises exception if the element doesn't appear" do
|
155
|
+
expect { browser.div(id: 'bar').click }.to raise_unknown_object_exception
|
156
|
+
end
|
157
|
+
|
158
|
+
it "raises exception if the element doesn't become enabled" do
|
159
|
+
expect { browser.button(id: 'btn').click }.to raise_object_disabled_exception
|
160
|
+
end
|
161
|
+
|
162
|
+
end
|
163
|
+
|
147
164
|
not_compliant_on :relaxed_locate do
|
148
165
|
describe "#wait_until &:enabled?" do
|
149
166
|
it "invokes subsequent method calls when the element becomes enabled" do
|
data/watir.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: watir
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.8.
|
4
|
+
version: 6.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Rodionov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-09-
|
12
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|