-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feature: Create WebDriverManager for starting and stopping local webdriver servers (and more) #99
Comments
I'm not clear on what the issue is here.
As for (1), this has not been a goal of this project so far, but I can see how it could be useful especially for running on your local machine during development. However, one issue with running chromedriver locally like this is that the browser will steal keyboard input focus depending on what you do, and will also be brought in front of other applications if you take a screenshot via automation, which isn't ideal if you want to keep working while the browser is running. I would strongly recommend using docker to run the browser, as per the README. You can view the browser in-flight using VNC. For (2), this would be a bug if |
Please, transform in a feature, something like webdriver_manager module of python should be awesome, because it not only download chromedriver, also keep updated according to user chrome version. All APIs of selenium in other languages manage driver binary as I know. Thank you.
Obter o Outlook para Android<https://aka.ms/AAb9ysg>
…________________________________
From: Steve Pryde ***@***.***>
Sent: Sunday, July 3, 2022 7:29:45 AM
To: stevepryde/thirtyfour ***@***.***>
Cc: 520Pig520 ***@***.***>; Author ***@***.***>
Subject: Re: [stevepryde/thirtyfour] I have to start chromedriver server with another function, but could be not necessary (Issue #99)
I'm not clear on what the issue is here.
1. Are you suggesting that this library takes care of starting and stopping the chromedriver binary? What about other browsers?
2. Or are you referring to the issue of the WebDriver session not being stopped correctly?
As for (1), this has not been a goal of this project so far, but I can see how it could be useful especially for running on your local machine during development. However, one issue with running chromedriver locally like this is that the browser will steal keyboard input focus depending on what you do, and will also be brought in front of other applications if you take a screenshot via automation, which isn't ideal if you want to keep working while the browser is running. I would strongly recommend using docker to run the browser, as per the README. You can view the browser in-flight using VNC.
If you do want thirtyfour to manage its own chromedriver instance, let me know. That would transform this ticket into a feature request, and we can discuss how that feature should work in the case of chromedriver and geckodriver. I would be happy to limit support to just those two.
For (2), this would be a bug if driver.quit().await did indeed not close the session. I will test this further to confirm.
Btw, closing the WebDriver session will not terminate chromedriver itself. That is not what that API call does.
—
Reply to this email directly, view it on GitHub<#99 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AIGFGP6T666W7FGEV2LR66TVSFTRTANCNFSM5ZI5Y3QA>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
I never thought of making it automatically download the latest version of |
I've updated this issue to be for the following features:
The webdriver download parts may be split out into a separate issue. |
For reference: https://pypi.org/project/webdriver-manager/ Also, I think this should probably be a separate crate+repo since it would be useful for fantoccini as well. |
@stevepryde may it help you? |
Definitely! There's another aspect which is managing the life cycle of the webdriver etc. Thanks for letting me know about this 😊 |
See also #127 |
For now I would direct people to use Also see: https://github.com/stevepryde/thirtyfour#using-selenium-manager |
@stevepryde I noticed that your second link isn't in the readme anymore. Do you still recommend using Selenium Manager or is there a better way? I've been struggling with this myself, and am using a naive implementation in the meantime (link). |
At this stage I still have not actually used Selenium-manager because it's not easy to build and to my knowledge the binaries are not hosted anywhere. I had planned to maintain a mirror of it that gets pushed to crates.io but that might be more work than I have time for. The advantage is that it's an official tool so it should be well supported, hopefully. That said, it isn't practical to use. I prefer using the Selenium docker images personally. |
I'm using this function to start chromedriver, passing a path to it as parameter, but if you have use other selenium bindings, this is the common use. Pass the ip address for webdriver force the user to start by command line the chromedriver executable for example.
I'm calling the above function this way:
and the latest lines are:
I'm doing it because driver.quit() don't kill the session and chromedriver process still running after program has finished. Sometimes, the browser doesn't open, and the prompt say the output of chromedriver executable (chromedriver was started successfully whatever) and the next lines to exit never are executed, so the program run forever doing nothing, like stucked in while loop.
The text was updated successfully, but these errors were encountered: