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

[🐛 Bug]: Outdated documentation: "Fresh browser per test" #927

Closed
palbr opened this issue Jan 13, 2022 · 8 comments
Closed

[🐛 Bug]: Outdated documentation: "Fresh browser per test" #927

palbr opened this issue Jan 13, 2022 · 8 comments
Labels
documentation Improvements or additions to documentation

Comments

@palbr
Copy link
Contributor

palbr commented Jan 13, 2022

What happened?

The documentation at https://www.selenium.dev/documentation/test_practices/encouraged/fresh_browser_per_test/ is recommending to start a new FirefoxDriver with a certain FirefoxProfile.

If I understand the API correct, Selenium 4.1.1 does not support creating a new FirefoxDriver with a FirefoxProfile as parameter.
See Selenium Java API for FirefoxDriver.

How can we reproduce the issue?

Visit https://www.selenium.dev/documentation/test_practices/encouraged/fresh_browser_per_test/ and compare to https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/firefox/FirefoxDriver.html

Or copy this code snipped in your IDE:

FirefoxProfile profile = new FirefoxProfile(new File("pathToFirefoxProfile"));
WebDriver driver = new FirefoxDriver(profile);

Relevant log output

IDE is telling:
"Cannot resolve constructor 'FirefoxDriver(org.openqa.selenium.firefox.FirefoxProfile)'"

Operating System

Windows 10

Selenium version

Java 4.1.1

What are the browser(s) and version(s) where you see this issue?

does not matter

What are the browser driver(s) and version(s) where you see this issue?

does not matter

Are you using Selenium Grid?

No

@github-actions
Copy link
Contributor

@palbr, 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.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

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

Thank you!

@palbr
Copy link
Contributor Author

palbr commented Jan 13, 2022

A new version of this code sample could be:

FirefoxProfile profile = new FirefoxProfile(new File("pathToFirefoxProfile"));
WebDriver driver = new FirefoxDriver(new FirefoxOptions().setProfile(profile));

Inserted new FirefoxOptions().setProfile(. And a closing parenthesis.

@titusfortner titusfortner transferred this issue from SeleniumHQ/selenium Jan 13, 2022
@titusfortner
Copy link
Member

Thanks for raising the issue, would you like to make a pull request with your solution?
Contributions guide is here — https://www.selenium.dev/documentation/about/contributing/

@palbr
Copy link
Contributor Author

palbr commented Jan 14, 2022

I think, setting up a development environment for Selenium (git clone, git fork, installing hugo, ...) and reading hugo manuals will take more time than I can afford at the moment. And comparing this time consumption against the "real work" of changing two line in the documentation seems to me like a very bad ratio.

@diemol
Copy link
Member

diemol commented Jan 14, 2022

Strange. Given that you have already contributed in the past, we thought it'd be a nice way to keep giving back to this project.

But ok, we will find a way to make contributions more simple then. Thank you for the feedback.

@titusfortner
Copy link
Member

Installing Hugo and previewing changes isn't strictly required, though we would appreciate any code updates being made in all 4 of the language files.

And, yes, our hope is that you would continue to help us make the documentation better, which would make the forking/cloning more worth your time. But thank you for raising this issue, either way.

@diemol diemol added the documentation Improvements or additions to documentation label Jul 28, 2022
@jags14385
Copy link
Contributor

@diemol Can I pick this issue ?

jags14385 added a commit to jags14385/seleniumhq.github.io that referenced this issue Jul 28, 2022
jags14385 added a commit to jags14385/seleniumhq.github.io that referenced this issue Jul 28, 2022
@diemol diemol closed this as completed in e9323eb Jul 28, 2022
selenium-ci added a commit that referenced this issue Jul 28, 2022
* Fixes #927

* Fixes #927. made content changes as per review

* removing redundant info

* 80 characters per line fix

* Add info in the ja,pt-br,zh-cn files for the same

Co-authored-by: Jags <jags14385@users.noreply.github.com>
Co-authored-by: Diego Molina <diemol@users.noreply.github.com>

Fixes #927

[deploy site] e9323eb
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot locked and limited conversation to collaborators Aug 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants