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

Fix removed Selenium::WebDriver::Remote::Capabilities.firefox method #336

Merged

Conversation

gustavosobral
Copy link
Contributor

@gustavosobral gustavosobral commented Aug 28, 2023

The selenium-webdriver browser class methods for Capabilities were deprecated on version 4.8 (https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES#L123) and on version 4.11.0 it got removed (SeleniumHQ/selenium#12417)

At the moment if we are using selenium-webdriver 4.11 and :selenium_billy or :selenium_headless_billy drivers we run into the following error:

NoMethodError:
  undefined method `firefox' for Selenium::WebDriver::Remote::Capabilities:Class

             Selenium::WebDriver::Remote::Capabilities.firefox(accept_insecure_certs: true)

According to my research, Selenium::WebDriver::Firefox::Options has accept_insecure_certs as true for default since version 4.5: https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES#L181 / https://github.com/SeleniumHQ/selenium/blob/selenium-4.5.0/rb/lib/selenium/webdriver/firefox/options.rb#L61.

I also added specs to make sure Firefox stays working.

@gustavosobral
Copy link
Contributor Author

gustavosobral commented Aug 28, 2023

The build is failing on Ruby 2.6 but Ruby 2.6 has reached EOL since 2022-04-12 (https://www.ruby-lang.org/en/downloads/branches/). I'm not sure if we can just drop 2.6 support moving forward?

I'm trying replicate the issue locally but even installing Ruby 2.6 on a M1 MacBook has proven to be a bit troublesome.

I have a proposal PR dropping Ruby 2.6 support here #337, let me know what do you think.

@ronwsmith ronwsmith merged commit 33ca869 into oesmith:master Aug 30, 2023
4 of 5 checks passed
@ronwsmith
Copy link
Collaborator

Released in v4.0.0

@gustavosobral gustavosobral deleted the fix-deprecated-firefox-methods branch August 30, 2023 14:06
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

2 participants