Skip to content

Commit

Permalink
[ruby] replaced Capabilities class test with Options class test
Browse files Browse the repository at this point in the history
  • Loading branch information
TamsilAmani committed Aug 3, 2022
1 parent f7d6709 commit ba2de34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions rb/lib/selenium/webdriver/remote/bridge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -684,8 +684,8 @@ def check_chrome_w3c_false(capabilities)

return if w3c

raise Error::WebDriverError, "Setting 'w3c: false' inside 'goog:chromeOptions' is not "\
"allowed. \nPlease update to W3C Syntax: https://www"\
raise Error::WebDriverError, "Setting 'w3c: false' is not allowed.\n"\
"Please update to W3C Syntax: https://www"\
".selenium.dev/blog/2022/legacy-protocol-support/"
end
end # Bridge
Expand Down
8 changes: 2 additions & 6 deletions rb/spec/integration/selenium/webdriver/driver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,8 @@ module WebDriver
end

it 'should raise error when w3c is false', exclusive: {browser: %i[chrome]} do
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
'goog:chromeOptions': {
w3c: false
}
)
expect { create_driver!(capabilities: capabilities) }.to raise_error(Error::WebDriverError)
options = Selenium::WebDriver::Chrome::Options.new(w3c: false)
expect { Selenium::WebDriver.for :chrome, capabilities: options }.to raise_error(Error::WebDriverError)
end

it 'should get driver status' do
Expand Down

0 comments on commit ba2de34

Please sign in to comment.