watir 6.7.2 → 6.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +4 -0
- data/lib/watir/capabilities.rb +7 -4
- data/spec/browser_spec.rb +20 -0
- data/watir.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b930f2cf34bcc0aad97aa3ea3e8fc13b17e3ecc
|
4
|
+
data.tar.gz: c499625ec63a5040ee9ad3d1fd37e2f4db5603c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1c18ce7ac92e2230145cd918590f659c0dd9d6b548962ba6345127bf7ab8a2784754145a0d39a6de9d9b67bcbcf869c27fbaad31a4444a3ab046f71d9f3e5e2
|
7
|
+
data.tar.gz: c263afc6af431c74738b73b290b8613a99417d7243cee861ca3f41b09e7f58d6c08532c7cf0ebef492845b1d51dfc64333a736c322e2835a3cc9b282439dbd32
|
data/CHANGES.md
CHANGED
data/lib/watir/capabilities.rb
CHANGED
@@ -5,6 +5,7 @@ module Watir
|
|
5
5
|
|
6
6
|
def initialize(browser, options = {})
|
7
7
|
@options = options.dup
|
8
|
+
Watir.logger.info "Creating Browser instance of #{browser} with user provided options: #{@options.inspect}"
|
8
9
|
@browser = if browser == :remote && @options.key?(:browser)
|
9
10
|
@options.delete(:browser)
|
10
11
|
elsif browser == :remote && @options.key?(:desired_capabilities)
|
@@ -18,21 +19,23 @@ module Watir
|
|
18
19
|
end
|
19
20
|
|
20
21
|
def to_args
|
21
|
-
[@selenium_browser,
|
22
|
+
[@selenium_browser, process_arguments]
|
22
23
|
end
|
23
24
|
|
24
25
|
private
|
25
26
|
|
26
|
-
def
|
27
|
+
def process_arguments
|
27
28
|
url = @options.delete(:url)
|
28
29
|
@selenium_opts[:url] = url if url
|
29
30
|
|
30
31
|
create_http_client
|
31
32
|
|
32
33
|
@selenium_opts[:port] = @options.delete(:port) if @options.key?(:port)
|
34
|
+
@selenium_opts[:driver_opts] = @options.delete(:driver_opts) if @options.key?(:driver_opts)
|
33
35
|
|
34
36
|
process_browser_options
|
35
|
-
|
37
|
+
process_capabilities
|
38
|
+
Watir.logger.info "Creating Browser instance with Watir processed options: #{@selenium_opts.inspect}"
|
36
39
|
|
37
40
|
@selenium_opts
|
38
41
|
end
|
@@ -94,7 +97,7 @@ module Watir
|
|
94
97
|
end
|
95
98
|
end
|
96
99
|
|
97
|
-
def
|
100
|
+
def process_capabilities
|
98
101
|
caps = @options.delete(:desired_capabilities)
|
99
102
|
|
100
103
|
if caps
|
data/spec/browser_spec.rb
CHANGED
@@ -132,6 +132,26 @@ describe Watir::Browser do
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
+
compliant_on :chrome do
|
136
|
+
it "takes port and driver_opt as arguments" do
|
137
|
+
@original = WatirSpec.implementation.clone
|
138
|
+
browser.close
|
139
|
+
@opts = WatirSpec.implementation.browser_args.last
|
140
|
+
|
141
|
+
@opts.merge!(port: '2314', driver_opts: {args: ['foo']})
|
142
|
+
|
143
|
+
@new_browser = WatirSpec.new_browser
|
144
|
+
|
145
|
+
service = @new_browser.wd.instance_variable_get("@service")
|
146
|
+
expect(service.instance_variable_get("@extra_args")).to eq ["foo"]
|
147
|
+
expect(service.instance_variable_get("@port")).to eq 2314
|
148
|
+
|
149
|
+
@new_browser.close
|
150
|
+
WatirSpec.implementation = @original.clone
|
151
|
+
$browser = WatirSpec.new_browser
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
135
155
|
it "takes a driver instance as argument" do
|
136
156
|
mock_driver = double(Selenium::WebDriver::Driver)
|
137
157
|
expect(Selenium::WebDriver::Driver).to receive(:===).with(mock_driver).and_return(true)
|
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.7.
|
5
|
+
s.version = '6.7.3'
|
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,5 +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
|
+
s.add_development_dependency 'webdrivers', '~> 2.0'
|
37
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.7.
|
4
|
+
version: 6.7.3
|
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-08-
|
12
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: selenium-webdriver
|
@@ -175,16 +175,16 @@ dependencies:
|
|
175
175
|
name: webdrivers
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
|
-
- - "
|
178
|
+
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '0'
|
180
|
+
version: '2.0'
|
181
181
|
type: :development
|
182
182
|
prerelease: false
|
183
183
|
version_requirements: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
185
|
+
- - "~>"
|
186
186
|
- !ruby/object:Gem::Version
|
187
|
-
version: '0'
|
187
|
+
version: '2.0'
|
188
188
|
description: |
|
189
189
|
Watir stands for Web Application Testing In Ruby
|
190
190
|
It facilitates the writing of automated tests by mimicing the behavior of a user interacting with a website.
|