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

Add seleniummanager examples with filesystem download explanations #1519

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

ojintoad
Copy link

@ojintoad ojintoad commented Nov 1, 2023

Add code samples and file download explanations

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

Adds two examples for how SeleniumManager obtains files for chromedriver

Motivation and Context

This helped me understand how the automatic behavior functions which may help others

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

Add code samples and file download explanations
Copy link

netlify bot commented Nov 1, 2023

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit fd47bb6

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

First, thanks for the PR. I'm trying to determine what extra value this information provides the user. Perhaps what we have could be laid out differently, but it seems like this is duplicated information. Maybe we can discuss more of what gets put in the .cache directory, but it probably doesn't need its own section.


These are provided in C# but similar code would work for other languages.

If you want to use ChromeDriver for the version currently installed on your machine, then you can run:
Copy link
Member

Choose a reason for hiding this comment

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

But this is just a normal code execution. Feels weird to put code that shows starting a driver here because there is nothing explicitly Selenium Manager related.

Copy link
Author

Choose a reason for hiding this comment

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

My point was to drive home the point that the manager is operating in the background and make it clearer that normal driver execution is using the Selenium Manager. While this article says that, I felt it was challenging to understand as someone who has been having to manage driver metadata in a professional capacity.

Copy link
Member

Choose a reason for hiding this comment

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

If it were up to me this whole page would be much shorter. We don't spend much time walking through implementation of any other feature. It's all supposed to just work in the background.

I'm not sure how to help people more if they can't read the first thing on the page: 😦

Selenium Manager is a command-line tool implemented in Rust that provides automated driver and browser management for Selenium. Selenium bindings use this tool by default, so you do not need to download it or add anything to your code or do anything else to use it.

Like, if we need to put that disclaimer in more places on the page, I'd be more in favor of that than just writing code that is the equivalent of "ignore this, just use Selenium like normal and it works"

@@ -68,6 +68,68 @@ edge can only be installed in Windows with administrator permissions

Therefore, administrator permissions are required to install Edge in Windows automatically through Selenium Manager, and Edge is eventually installed in the usual program files folder (e.g., `C:\Program Files (x86)\Microsoft\Edge`).

## Example WebDriver Code

These are provided in C# but similar code would work for other languages.
Copy link
Member

Choose a reason for hiding this comment

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

I really do not want to do single language examples. Things got bad when everything was java 😂

Copy link
Author

Choose a reason for hiding this comment

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

Fair enough - it'll take me some time to cobble together other languages, but I'll probably be able to borrow some sample code

Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure any of the code examples are necessary. They are literally duplicating what we have in our getting started with Selenium section.

chromedriver/win64/119.0.6045.105/chromedriver.exe
```

If you wanted to use an older version of Chrome, let's say 117, then you can run:
Copy link
Member

Choose a reason for hiding this comment

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

This seems like a duplicate of what is in line 51?

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