diff --git a/rb/lib/selenium/webdriver/firefox/binary.rb b/rb/lib/selenium/webdriver/firefox/binary.rb index 8d9fe06f0361d..9fcbc8170c741 100644 --- a/rb/lib/selenium/webdriver/firefox/binary.rb +++ b/rb/lib/selenium/webdriver/firefox/binary.rb @@ -121,7 +121,7 @@ def path when :windows windows_path when :linux, :unix - Platform.find_binary("firefox3", "firefox2", "firefox") || "/usr/bin/firefox" + Platform.find_binary('firefox3', 'firefox2', 'firefox') || '/usr/bin/firefox' else raise Error::WebDriverError, "unknown platform: #{Platform.os}" end diff --git a/rb/lib/selenium/webdriver/remote/w3c_bridge.rb b/rb/lib/selenium/webdriver/remote/w3c_bridge.rb index 1dfee63ab723b..0d56e609c1a28 100755 --- a/rb/lib/selenium/webdriver/remote/w3c_bridge.rb +++ b/rb/lib/selenium/webdriver/remote/w3c_bridge.rb @@ -165,7 +165,7 @@ def dismiss_alert end def alert=(keys) - execute :sendAlertText, {}, {handler: 'prompt', message: keys} + execute :sendAlertText, {}, {handler: 'prompt', text: keys} end def alert_text diff --git a/rb/lib/selenium/webdriver/support/color.rb b/rb/lib/selenium/webdriver/support/color.rb index bf09584935afc..297ca2584a553 100644 --- a/rb/lib/selenium/webdriver/support/color.rb +++ b/rb/lib/selenium/webdriver/support/color.rb @@ -66,7 +66,7 @@ def self.from_string(str) array = [Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3)] new(*array.map { |e| (e * 2).to_i(16) }) when HSL_PATTERN, HSLA_PATTERN - from_hsl($1, $2, $3, $4) + from_hsl(Regexp.last_match(1), Regexp.last_match(2), Regexp.last_match(3), Regexp.last_match(4)) else raise ArgumentError, "could not convert #{str.inspect} into color" end diff --git a/rb/spec/integration/selenium/webdriver/element_spec.rb b/rb/spec/integration/selenium/webdriver/element_spec.rb index 01ad0d419441e..0429700b94a97 100644 --- a/rb/spec/integration/selenium/webdriver/element_spec.rb +++ b/rb/spec/integration/selenium/webdriver/element_spec.rb @@ -76,6 +76,7 @@ module WebDriver end # PhantomJS on windows issue: https://github.com/ariya/phantomjs/issues/10993 + # Marionette BUG - https://bugzilla.mozilla.org/show_bug.cgi?id=1260233 not_compliant_on browser: [:android, :iphone, :safari, :edge, :marionette, :phantomjs] do it 'should handle file uploads' do driver.navigate.to url_for('formPage.html') @@ -168,6 +169,7 @@ module WebDriver expect(size.height).to be > 0 end + # Marionette - Waiting on implementation in httpd after spec section rewrite not_compliant_on browser: [:safari, :marionette] do it 'should drag and drop' do driver.navigate.to url_for('dragAndDropTest.html') diff --git a/rb/spec/integration/selenium/webdriver/keyboard_spec.rb b/rb/spec/integration/selenium/webdriver/keyboard_spec.rb index 38a9b9a6fa8e9..1a33d29f824d4 100644 --- a/rb/spec/integration/selenium/webdriver/keyboard_spec.rb +++ b/rb/spec/integration/selenium/webdriver/keyboard_spec.rb @@ -21,7 +21,7 @@ module Selenium module WebDriver - # Marionette BUG - Interactions Not Supported + # Marionette - Waiting on implementation in httpd after spec section rewrite # Firefox BUG - https://github.com/SeleniumHQ/selenium/issues/1792 not_compliant_on browser: [:android, :iphone, :safari, :marionette, :firefox] do describe Keyboard do diff --git a/rb/spec/integration/selenium/webdriver/mouse_spec.rb b/rb/spec/integration/selenium/webdriver/mouse_spec.rb index 1be9878c170d6..cce7443c8d4d1 100644 --- a/rb/spec/integration/selenium/webdriver/mouse_spec.rb +++ b/rb/spec/integration/selenium/webdriver/mouse_spec.rb @@ -21,7 +21,7 @@ module Selenium module WebDriver - # Marionette BUG - Interactions Not Supported + # Marionette - Waiting on implementation in httpd after spec section rewrite not_compliant_on browser: [:android, :iphone, :safari, :marionette] do describe Mouse do it 'clicks an element' do diff --git a/rb/spec/integration/selenium/webdriver/options_spec.rb b/rb/spec/integration/selenium/webdriver/options_spec.rb index 8eff6c26bbeea..533477fbe78bb 100644 --- a/rb/spec/integration/selenium/webdriver/options_spec.rb +++ b/rb/spec/integration/selenium/webdriver/options_spec.rb @@ -95,7 +95,7 @@ module WebDriver end end - # Marionette BUG - Failed to convert expiry to Date + # Marionette BUG - https://bugzilla.mozilla.org/show_bug.cgi?id=1256007 not_compliant_on browser: [:android, :iphone, :safari, :marionette] do it 'should use DateTime for expires' do driver.navigate.to url_for('xhtmlTest.html') diff --git a/rb/spec/integration/selenium/webdriver/target_locator_spec.rb b/rb/spec/integration/selenium/webdriver/target_locator_spec.rb index f2805d012174c..04ac23b36a20d 100644 --- a/rb/spec/integration/selenium/webdriver/target_locator_spec.rb +++ b/rb/spec/integration/selenium/webdriver/target_locator_spec.rb @@ -131,7 +131,7 @@ module WebDriver expect(driver.title).to eq('XHTML Test Page') end - # Marionette BUG: Automatically switches browsing context to new window when it opens. + # Marionette BUG - https://bugzilla.mozilla.org/show_bug.cgi?id=1280517 not_compliant_on browser: [:marionette, :ie] do context 'with more than two windows' do it 'should close current window when more than two windows exist' do @@ -252,10 +252,7 @@ module WebDriver end end - # Marionette BUG - http://www.w3.org/TR/webdriver/#send-alert-text - # Says message should be an array (I think), but we're getting - # InvalidArgumentError: 'message' not a string - # When trying a string, error: keysToSend.join is not a function + # Marionette BUG - https://bugzilla.mozilla.org/show_bug.cgi?id=1255906 # Edge Under Consideration - https://dev.windows.com/en-us/microsoft-edge/platform/status/webdriver/details/ not_compliant_on browser: [:marionette, :edge] do it 'allows the user to set the value of a prompt' do @@ -301,6 +298,7 @@ module WebDriver end end + # Marionette BUG - https://bugzilla.mozilla.org/show_bug.cgi?id=1279211 not_compliant_on browser: :marionette do it 'raises an UnhandledAlertError if an alert has not been dealt with' do driver.navigate.to url_for('alerts.html') diff --git a/rb/spec/integration/selenium/webdriver/window_spec.rb b/rb/spec/integration/selenium/webdriver/window_spec.rb index 63c27540f6081..386b519c57992 100644 --- a/rb/spec/integration/selenium/webdriver/window_spec.rb +++ b/rb/spec/integration/selenium/webdriver/window_spec.rb @@ -89,6 +89,7 @@ module WebDriver end end + # Marionette - https://bugzilla.mozilla.org/show_bug.cgi?id=1189749 compliant_on browser: [:marionette, :edge] do # Edge: Not Yet - https://dev.windows.com/en-us/microsoft-edge/platform/status/webdriver/details/ not_compliant_on browser: [:marionette, :edge] do diff --git a/rb/spec/unit/selenium/webdriver/remote/bridge_spec.rb b/rb/spec/unit/selenium/webdriver/remote/bridge_spec.rb index 3525e9ccc23d9..52c0dcdeb7551 100644 --- a/rb/spec/unit/selenium/webdriver/remote/bridge_spec.rb +++ b/rb/spec/unit/selenium/webdriver/remote/bridge_spec.rb @@ -31,7 +31,8 @@ module Remote request_body = JSON.generate(sessionId: '11123', value: {}) headers = {'Content-Type' => 'application/json'} stub_request(:post, 'http://127.0.0.1:4444/wd/hub/session').to_return( - status: 200, body: request_body, headers: headers) + status: 200, body: request_body, headers: headers + ) bridge = Bridge.new expect { bridge.upload('NotAFile') }.to raise_error(Error::WebDriverError)