seleniumhq.github.io icon indicating copy to clipboard operation
seleniumhq.github.io copied to clipboard

[🐛 Bug]: Documentation for Remote WebDriver is at odds with deprecation warning.

Open v-kumar opened this issue 2 years ago • 5 comments

What happened?

Using ruby, for remote driver, the following example gives deprecation warning.

URL: https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/

image

image

However, it is not clear how to use Options only instead.

What browsers and operating systems are you seeing the problem on?

ruby selenium web-driver, v 4.8.x

v-kumar avatar Apr 25 '23 21:04 v-kumar

@v-kumar, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

github-actions[bot] avatar Apr 25 '23 21:04 github-actions[bot]

Yes, that code example is very much out of date.

As to the deprecation warning, instead of working with:

options = Remote::WebDriver::Capabilities.chrome

work with:

options = Options.chrome

The object has attribute accessors for each of the things you can change (#browser_version= & #platform_name=), so it should be more straightforward

titusfortner avatar Apr 25 '23 22:04 titusfortner

It's not still clear how to configure the remote browser based on the above information. Is just passing browser: :remote, good enough?

  Capybara::Selenium::Driver.new app, browser: :remote, options: options,

v-kumar avatar Apr 26 '23 00:04 v-kumar

I'm not a capybara expert, but this is the example code I have that works: https://github.com/saucelabs-training/demo-ruby/blob/main/selenium-examples/capybara-rspec/spec/spec_helper.rb#L16-L41

titusfortner avatar Apr 26 '23 00:04 titusfortner

Ah yes chromus depricatus

ghost avatar Sep 13 '23 11:09 ghost

@harsha509 I think this issue can probably be closed. The Browser Options section, and the referenced example, is no longer present in the Remote Webdriver Page

shbenzer avatar Oct 16 '24 17:10 shbenzer

Documentation for using the Options class is now available, along with updated code examples: Chrome Options.

Closing as resolved!

harsha509 avatar Oct 16 '24 17:10 harsha509