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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby 2.7 deprecations #7870

Closed
connorshea opened this issue Dec 18, 2019 · 3 comments
Closed

Ruby 2.7 deprecations #7870

connorshea opened this issue Dec 18, 2019 · 3 comments
Labels

Comments

@connorshea
Copy link
Contributor

馃悰 Bug Report

There are deprecation warnings for Selenium in Ruby 2.7, which comes out next week. They're all from this change to position arguments/kwargs.

The deprecation warning includes the callsite and the method being called:

/Users/connorshea/.rbenv/versions/2.7.0-preview3/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/chrome/driver.rb:43: warning: The last argument is used as the keyword parameter
/Users/connorshea/.rbenv/versions/2.7.0-preview3/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/bridge.rb:44: warning: for `handshake' defined here

/Users/connorshea/.rbenv/versions/2.7.0-preview3/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/bridge.rb:62: warning: The last argument is used as the keyword parameter
/Users/connorshea/.rbenv/versions/2.7.0-preview3/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.6/lib/selenium/webdriver/remote/w3c/bridge.rb:35: warning: for `initialize' defined here

These are the only two I'm seeing in my test suite, but there are probably others.

To Reproduce

Detailed steps to reproduce the behavior:

It should be possible to reproduce this by just running the selenium-rb test suite on Ruby 2.7. I'm not sure exactly how to trigger these, short of running my app's test suite, unfortunately.

Expected behavior

I'd expect no deprecation warnings.

Environment

OS: macOS 10.14.6 Mojave
Browser: Chrome
Browser version: Chrome 79
Browser Driver version: ChromeDriver 79
Language Bindings version: Ruby 3.142.6

@p0deje
Copy link
Member

p0deje commented Dec 27, 2019

Thanks for the report and the fix! I wonder if RuboCop has a cop that can identify all such cases.
Anyway, I've just released 3.142.7 with your fix.

@connorshea
Copy link
Contributor Author

Thanks!

@lock
Copy link

lock bot commented Jan 26, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Jan 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants