watir 6.7.0 → 6.7.1
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 +9 -4
- data/spec/browser_spec.rb +14 -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: 4aa59f8349f178e00a119dabd2373320704441d6
|
|
4
|
+
data.tar.gz: f4ffc2c9fb5847ee662c43834a158121a9a2884c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: addf993cd30bac3223c93a74f9a36c646c8e9d45e5478708ee6e35d1178a779e80f43313d194a770c356e8d763b7ffbdc628ebb30c703b4a15bf60e4b6bdf03f
|
|
7
|
+
data.tar.gz: e7d0f9e05ed00e04175622ec32322ef20f2e4cebdd12308c1a47c973e7ca4e9ba393309279395c0e72cb7f530673dd55ed8e150886a004ed6ba5f35bcc90dd28
|
data/CHANGES.md
CHANGED
data/lib/watir/capabilities.rb
CHANGED
|
@@ -58,7 +58,7 @@ module Watir
|
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def process_browser_options
|
|
61
|
-
browser_options = @options.delete(:options)
|
|
61
|
+
browser_options = @options.delete(:options) || {}
|
|
62
62
|
|
|
63
63
|
case @selenium_browser
|
|
64
64
|
when :chrome
|
|
@@ -72,10 +72,15 @@ module Watir
|
|
|
72
72
|
browser_options[:args] += ['--headless', '--disable-gpu']
|
|
73
73
|
end
|
|
74
74
|
@selenium_opts[:options] = browser_options if browser_options.is_a? Selenium::WebDriver::Chrome::Options
|
|
75
|
-
@selenium_opts[:options] ||= Selenium::WebDriver::Chrome::Options.new(browser_options)
|
|
75
|
+
@selenium_opts[:options] ||= Selenium::WebDriver::Chrome::Options.new(browser_options)
|
|
76
76
|
when :firefox
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
profile = @options.delete(:profile)
|
|
78
|
+
if browser_options.is_a? Selenium::WebDriver::Firefox::Options
|
|
79
|
+
@selenium_opts[:options] = browser_options
|
|
80
|
+
Watir.logger.deprecate 'Initializing Browser with both :profile and :option', ':profile as a key inside :option' if profile
|
|
81
|
+
end
|
|
82
|
+
@selenium_opts[:options] ||= Selenium::WebDriver::Firefox::Options.new(browser_options)
|
|
83
|
+
@selenium_opts[:options].profile = profile if profile
|
|
79
84
|
when :safari
|
|
80
85
|
Selenium::WebDriver::Safari.technology_preview! if @options.delete(:technology_preview)
|
|
81
86
|
when :remote
|
data/spec/browser_spec.rb
CHANGED
|
@@ -74,6 +74,20 @@ describe Watir::Browser do
|
|
|
74
74
|
end
|
|
75
75
|
end
|
|
76
76
|
|
|
77
|
+
compliant_on :firefox do
|
|
78
|
+
it "accepts profile" do
|
|
79
|
+
home_page = WatirSpec.url_for("special_chars.html")
|
|
80
|
+
profile = Selenium::WebDriver::Firefox::Profile.new
|
|
81
|
+
profile['browser.startup.homepage'] = home_page
|
|
82
|
+
profile['browser.startup.page'] = 1
|
|
83
|
+
@opts.merge!(profile: profile)
|
|
84
|
+
|
|
85
|
+
@new_browser = WatirSpec.new_browser
|
|
86
|
+
|
|
87
|
+
expect(@new_browser.url).to eq home_page
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
77
91
|
compliant_on :chrome do
|
|
78
92
|
it "accepts browser options" do
|
|
79
93
|
@opts.merge!(options: {emulation: {userAgent: 'foo;bar'}})
|
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.7.
|
|
4
|
+
version: 6.7.1
|
|
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-16 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: selenium-webdriver
|