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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 18ce4184fd15427b0f00abf58aa9d036fd37d13f
4
- data.tar.gz: 85f6b2e47e10b5c4b89f3c7d138fc58e143834bb
3
+ metadata.gz: 4aa59f8349f178e00a119dabd2373320704441d6
4
+ data.tar.gz: f4ffc2c9fb5847ee662c43834a158121a9a2884c
5
5
  SHA512:
6
- metadata.gz: 4f0159b01a4c1be3f0d3bddbd3b4a8d7d676aad75dc82a33441f7e5a4cd6e367833bca63050cc5256ba906f78a9784fef1c16d1cb21c5266fd0744018b76a149
7
- data.tar.gz: 912dfa7b7f8bf53acc6734a771ed86c98b1c71c4b5e1858f911611e1751213fb9d319a14d2595d378f26fc5b33766764c0b3213f47bf1b518356faa78cd7d6fe
6
+ metadata.gz: addf993cd30bac3223c93a74f9a36c646c8e9d45e5478708ee6e35d1178a779e80f43313d194a770c356e8d763b7ffbdc628ebb30c703b4a15bf60e4b6bdf03f
7
+ data.tar.gz: e7d0f9e05ed00e04175622ec32322ef20f2e4cebdd12308c1a47c973e7ca4e9ba393309279395c0e72cb7f530673dd55ed8e150886a004ed6ba5f35bcc90dd28
data/CHANGES.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 6.7.1 (2017-08-16)
2
+
3
+ * Fix bug preventing use of Firefox profiles (#625)
4
+
1
5
  ### 6.7.0 (2017-08-14)
2
6
 
3
7
  * Implement TableCell#column_header
@@ -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) if browser_options
75
+ @selenium_opts[:options] ||= Selenium::WebDriver::Chrome::Options.new(browser_options)
76
76
  when :firefox
77
- @selenium_opts[:options] = browser_options if browser_options.is_a? Selenium::WebDriver::Firefox::Options
78
- @selenium_opts[:options] ||= Selenium::WebDriver::Firefox::Options.new(options) if browser_options
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
@@ -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'}})
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'watir'
5
- s.version = '6.7.0'
5
+ s.version = '6.7.1'
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']
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.0
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-14 00:00:00.000000000 Z
12
+ date: 2017-08-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: selenium-webdriver