watir 6.2.1 → 6.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -7
- data/CHANGES.md +8 -0
- data/Rakefile +1 -3
- data/lib/watir/browser.rb +7 -7
- data/lib/watir/elements/element.rb +21 -5
- data/lib/watir/elements/iframe.rb +11 -2
- data/lib/watir/elements/image.rb +3 -2
- data/lib/watir/elements/select.rb +25 -4
- data/lib/watir/extensions/select_text.rb +3 -2
- data/lib/watir/locators/element/selector_builder.rb +1 -1
- data/lib/watir/locators/element/selector_builder/xpath.rb +14 -0
- data/lib/watirspec/rake_tasks.rb +2 -2
- data/spec/element_locator_spec.rb +14 -2
- data/spec/watirspec/after_hooks_spec.rb +39 -41
- data/spec/watirspec/alert_spec.rb +64 -66
- data/spec/watirspec/cookies_spec.rb +103 -105
- data/spec/watirspec/elements/div_spec.rb +1 -3
- data/spec/watirspec/elements/element_spec.rb +15 -2
- data/spec/watirspec/elements/filefield_spec.rb +33 -38
- data/spec/watirspec/elements/frame_spec.rb +5 -7
- data/spec/watirspec/elements/iframe_spec.rb +5 -7
- data/spec/watirspec/elements/select_list_spec.rb +26 -20
- data/spec/watirspec/relaxed_locate_spec.rb +8 -1
- data/spec/watirspec/window_switching_spec.rb +7 -9
- data/spec/watirspec_helper.rb +0 -4
- data/support/travis.sh +0 -26
- data/watir.gemspec +2 -1
- metadata +16 -2
@@ -201,7 +201,14 @@ describe 'Watir#relaxed_locate?' do
|
|
201
201
|
it 'raises exception immediately' do
|
202
202
|
start_time = ::Time.now
|
203
203
|
browser.a(id: 'show_bar').click
|
204
|
-
|
204
|
+
|
205
|
+
compliant_on :firefox do
|
206
|
+
expect { browser.div(id: 'bar').click }.to raise_exception(Selenium::WebDriver::Error::ElementNotInteractableError)
|
207
|
+
end
|
208
|
+
not_compliant_on :firefox do
|
209
|
+
expect { browser.div(id: 'bar').click }.to raise_exception(Selenium::WebDriver::Error::ElementNotVisibleError)
|
210
|
+
end
|
211
|
+
|
205
212
|
expect(::Time.now - start_time).to be < 1
|
206
213
|
end
|
207
214
|
end
|
@@ -372,19 +372,17 @@ not_compliant_on :safari do
|
|
372
372
|
end
|
373
373
|
|
374
374
|
not_compliant_on :firefox do
|
375
|
-
|
376
|
-
|
377
|
-
initial_pos = browser.window.position
|
375
|
+
it "should move the window" do
|
376
|
+
initial_pos = browser.window.position
|
378
377
|
|
379
|
-
|
378
|
+
browser.window.move_to(
|
380
379
|
initial_pos.x + 2,
|
381
380
|
initial_pos.y + 2
|
382
|
-
|
381
|
+
)
|
383
382
|
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
end
|
383
|
+
new_pos = browser.window.position
|
384
|
+
expect(new_pos.x).to eq initial_pos.x + 2
|
385
|
+
expect(new_pos.y).to eq initial_pos.y + 2
|
388
386
|
end
|
389
387
|
end
|
390
388
|
|
data/spec/watirspec_helper.rb
CHANGED
data/support/travis.sh
CHANGED
@@ -9,29 +9,3 @@ if [[ "$RAKE_TASK" = "yard:doctest" ]]; then
|
|
9
9
|
mkdir ~/.yard
|
10
10
|
bundle exec yard config -a autoload_plugins yard-doctest
|
11
11
|
fi
|
12
|
-
|
13
|
-
if [[ "$RAKE_TASK" = "spec:chrome" ]] || [[ "$RAKE_TASK" = "yard:doctest" ]]; then
|
14
|
-
CHROMEDRIVER_VERSION=$(curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE)
|
15
|
-
curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
|
16
|
-
unzip chromedriver_linux64.zip
|
17
|
-
|
18
|
-
mv chromedriver travis-drivers/chromedriver
|
19
|
-
chmod +x travis-drivers/chromedriver
|
20
|
-
fi
|
21
|
-
|
22
|
-
if [[ "$RAKE_TASK" = "spec:firefox" ]]; then
|
23
|
-
curl -L -O "http://raw.githubusercontent.com/watir/driver_binaries/master/geckodriver"
|
24
|
-
chmod +x geckodriver
|
25
|
-
|
26
|
-
mv geckodriver travis-drivers/geckodriver
|
27
|
-
geckodriver --version
|
28
|
-
firefox --version
|
29
|
-
fi
|
30
|
-
|
31
|
-
if [[ "$RAKE_TASK" = "spec:phantomjs" ]]; then
|
32
|
-
curl -L -O "http://raw.githubusercontent.com/watir/driver_binaries/master/phantomjs"
|
33
|
-
chmod +x phantomjs
|
34
|
-
|
35
|
-
mv phantomjs travis-drivers/phantomjs
|
36
|
-
phantomjs --version
|
37
|
-
fi
|
data/watir.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'watir'
|
5
|
-
s.version = '6.
|
5
|
+
s.version = '6.3.0'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.authors = ['Alex Rodionov', 'Titus Fortner']
|
8
8
|
s.email = ['p0deje@gmail.com', 'titusfortner@gmail.com']
|
@@ -33,4 +33,5 @@ It facilitates the writing of automated tests by mimicing the behavior of a user
|
|
33
33
|
s.add_development_dependency 'pry'
|
34
34
|
s.add_development_dependency 'coveralls'
|
35
35
|
s.add_development_dependency 'yard-doctest', '>= 0.1.8'
|
36
|
+
s.add_development_dependency 'webdrivers'
|
36
37
|
end
|
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.
|
4
|
+
version: 6.3.0
|
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-
|
12
|
+
date: 2017-06-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|
@@ -165,6 +165,20 @@ dependencies:
|
|
165
165
|
- - ">="
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: 0.1.8
|
168
|
+
- !ruby/object:Gem::Dependency
|
169
|
+
name: webdrivers
|
170
|
+
requirement: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
type: :development
|
176
|
+
prerelease: false
|
177
|
+
version_requirements: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
168
182
|
description: |
|
169
183
|
Watir stands for Web Application Testing In Ruby
|
170
184
|
It facilitates the writing of automated tests by mimicing the behavior of a user interacting with a website.
|