Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ruby] fix: setting w3c: false throws error #10918

Merged
merged 2 commits into from Aug 3, 2022

Conversation

TamsilAmani
Copy link
Contributor

@TamsilAmani TamsilAmani commented Aug 3, 2022

Description

w3c: false does not work in ruby binding. Setting this key as false will throw an error.

Motivation and Context

#10448 (comment)

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@TamsilAmani
Copy link
Contributor Author

As per @titusfortner, I have only thrown Error when w3c is false. And do nothing if w3c is true.
As per @AutomatedTester, he suggested to give a warning not to use w3c if user sets w3c as true.

Do let me know which approach to follow. Currently it is done without warning.

@p0deje
Copy link
Member

p0deje commented Aug 3, 2022

As per @titusfortner, I have only thrown Error when w3c is false. And do nothing if w3c is true.
As per @AutomatedTester, he suggested to give a warning not to use w3c if user sets w3c as true.

Do let me know which approach to follow. Currently it is done without warning.

We can do both, let's just check if capabilities had w3c passed explicitly and then call Selenium::WebDriver.logger.warn with a warning.

Copy link
Member

@titusfortner titusfortner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this code also work for setting it on options class? Please add the test to verify. We don't actually care about capabilities class, tbh.

Ruby is the only bindings supporting both capabilities and options still and one way or another, and it's on my list to fix when I get the time.

@titusfortner titusfortner merged commit 5325315 into SeleniumHQ:trunk Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants