seleniumhq.github.io
seleniumhq.github.io copied to clipboard
[🐛 Bug]: clarify that Service should be instantiated from the browser-specific class
What happened?
In this webpage there is written:
service = Service(executable_path=ChromeDriverManager().install())
But the argument to Service.__init__
, as also described in the documentation, seems to be executable
, not executable_path
What browsers and operating systems are you seeing the problem on?
OS: Fedora Workstation 35 Browser: Firefox
Hi @raffaem,
May be you're looking into wrong documentation. webdriver-manager is a third party library. So you need to look webdriver-manager specific doc https://github.com/SergeyPirogov/webdriver_manager.
As per their documentation, it is how it works!
Service(executable_path=ChromeDriverManager().install())
returns executable in short!
Hope this helps!
Hi @harsha509,
no I did not confuse the two projects, and I linked the Selenium's documentation, not webdriver-manager documentation.
However I was using the wrong workflow, as I was instancing selenium.webdriver.common.service.Service
, which takes esecutable
as an argument, instead of the browser-specific class, e.g. selenium.webdriver.chrome.service.Service
which indeed takes executable_path
as an argument.
I think this webpage should make clear that you have to instantiate Service from the browser-specific class, not from the common class.
Got it.
Docs need to be updated on instantiating Service from the browser-specific class
. Would you help us with a PR if possible ?
Here are the contribution guidelines for reference!
Closing as we did not get more information.
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.