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
TypeError: WebDriver.__init__() got an unexpected keyword argument 'service_log_path' #1835
Comments
@LLinden I recognize that project. That is Paul Merrill's Test Automation course. I will take a look and see what I can see .. |
@emanlove yes, it is! I'm using to learn Robot Framework. Thank you very much. In another machine the project was working, but when I migrate to a new one and had to reinstall all the programs needed I encontered this error. |
I did a quick check and I see the same error. I have a few things over the next few hours which will take me offline. But if I can't resolve within the next hour I will work on it this evening |
@emanlove thanks a lot! |
The quick fix seems to be to downgrade selenium to 4.9.0 which you can do by typing at the command prompt Still need time time see what is going on and check to see if Selenium 4.10.0, which I see just got released 4 hours ago, broke something that either SeleniumLibrary needs to fix or selenium possibly. |
I see. |
I will check tonight to see if there is a larger problem. Thanks for reporting this as I can make a notice in our Slack channel as well. |
I'm using robot framework and got: |
Hello, I'm running following setup:
When opening browser using either gecko or chromedrive, I get following errors:
Downgrading to selenium 4.9.0 using |
@anthonphax try downgrading your selenium to 4.9.0 which can be done with |
Updated I should also note I completely missed there is a v4.9.1 of selenium [changelog here] which one should downgrade (temporarily to that). So pip install selenium==4.9.1. Either v4.9.0 or 4.9.1 will work and I do prefer the latest working version so I suggest v4.9.1. |
@emanlove thanks for the solution. It worked for me. I was using selenium 4.10.0 and Robot Framework 6.1 (Python 3.11.3 on win32 , OS - windows 11 pro). After downgrading to selenium 4.9.0, it is working fine. But I am facing a problem, if you have time, let me know the solution. Input Text //*[@id="search"] never ---- this step is not executing, it is showing InvalidElementStateException. I have attached the log file. Please let me know what is wrong with my steps. |
@tvigneshnayak As that issue appears distinctly different than the main issue of this thread, it would be best to open a new issue so you get the best support and provided visibility and understanding to others. |
@emanlove solved this by including selenium==4.9.1 and robotframework-seleniumlibrary==6.0.0 on my build. tks! |
service_log_path along with a few other options were removed as they are now deprecated: This will require a bigish update to SeleniumLIbrary to switch to using a Service :( |
@mjblue As part of the planned/in-progress hotfix I have in mind straightforward switch that can be done within the library side of the code so little if any user code needs to change. @aaltat has suggested and I agree that making a Service "class" similar to the way the internal library code handles the options would be good solution. I'm not sure if that will be here in the hotfix or in the next release. |
Thanks @emanlove , I agree that should be able to be handled in the library by Switching to passing a service with the options rather than passing the options directly. Good Stuff, thanks for the update. |
|
…mlibrary. ``` TypeError: WebDriver.__init__() got an unexpected keyword argument 'service_log_path' ``` A fix is in the making: robotframework/SeleniumLibrary#1835
I was having the same error: TypeError: WebDriver.init() got an unexpected keyword argument 'service_log_path'. I was using robotframework==6.1.0 and selenium==4.10.0. As recommended in this thread, I downgraded to selenium==4.9.1 but it didn't work for me. The error I'm getting now is: OSError: [Errno 86] Bad CPU type in executable: '/opt/homebrew/lib/python3.11/site-packages/selenium/webdriver/common/macos/selenium-manager' Does anyone have a clue to fixing this? Thanks in advance! |
thank you @emanlove, i had the same problem. |
I had this problem for 1 day, but with @emanlove's tip it solved the code. Thanks |
* Reverted to an older version of Selenium (see robotframework/SeleniumLibrary#1835) * Removed failing tests for the Requests library (the most important is to test that library can be used, not to replicate its own tests)
I was having the same problem, I was even thinking that it was some setting of annotation in the variables in the PATH. But with @emanlove's mentorship, the problem was remedied. Thanks! |
|
@Aakash1045 The only way that error comes is if you have running Selenium 4.10.0. Be careful that you are not running multiple pythons or a virtualenv with a v4.10.0 version of selenium. Also I am a bit cautious with running Python 3.11 but that should not give this error (if it does at all). |
Thank you .... @ed Manlove
…On Tue, Jul 11, 2023 at 4:44 PM Ed Manlove ***@***.***> wrote:
@Aakash1045 <https://github.com/Aakash1045> The only way that error comes
is if you have running Selenium 4.10.0. Be careful that you are not running
multiple pythons or a virtualenv with a v4.10.0 version of selenium. Also I
am a bit cautious with running Python 3.11 but that should not give this
error (if it does at all).
—
Reply to this email directly, view it on GitHub
<#1835 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZSYHYNIDNQY7HGNMA2JPF3XPUYRRANCNFSM6AAAAAAY6IVZEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I tried the workaround but is not working for me:
Installed pip packages:
Python version: |
@Wolfred What do you get for the following commands
Also, are you running though an IDE? |
Ok, I'll review my setup and see if I see how that is configured on my machine. You've posted the two screenshots but neither contain the command to execute those. Could you share those? or at least review them to see if they appear to run the same Python version? |
@wolfred24 From the info you have shared I do see two Pythons installed: 3.11 and 3.9.6. In your most recent comment I see the 3.9.6 which appears to be the one ran when you get the error does indeed have Selenium v4.10.0 installed. If you type |
You are right! Thanks a lot @emanlove
|
@robottester-sketch That run "button" command is creating the command for you and executing it for you. If you scrolled up you will see what this is, something like
That first line will tell you a bit about how your script is being executed. Now that run button is what VS Code calls, a Run Configuration. These are configured generally on a "project" level but may be on a folder level as well. I am not super familiar with how VS Code does this nor how the extensions overwrite or supersede the project level ones. (Basically who is setting this and where they keep that info). .. um .. at this point we might need to go back and forth a little or you can dive down that path yourself. The command the run button uses as well as the run configuration (Run menu item > Open Configurations) should give you a head start. Here I must admit I am looking at my setup which I just was running RoboCode and some VScode commands to have the Robotcode extension do the execution. I didn't/hadn't looked behind the scenes yet to see al what they are doing how it is configured. Good reminder again is that what we are looking for is which Python instance is being executed and which selenium version is loaded on that one. |
Ok I added and restarted VS code and executed the test, its the same issue |
Sorry for all this confusion. System setups can at times be tricky. Was just looking to what yours was set as. The one above is from my system and just an example. [Updated: You might not be using fully the robotcode extensions and its templates. If you don't have by default a conda.yaml in your project then this suggestion would bnot be for how you have your setup. Sorry again] Also I realized the way I am going about it might be through the backdoor since you are using Robotcode. Try this, add the package to your conda.yaml file, as I have done with the very last line here,
[The rest is the default I had when I created theproject template, Yours may be different] |
Its working now, thankyou so much for your time and help |
Glad to hear that! I just started using the Robocorp Code extension a couple days ago as part of their RPA certification courses. So I wasn't super familiar with how it configures and uses Python on one's system. That is whether it uses the system Python or something else. (At a basic level It does appear to use the Language Server setting. But I suspect if that is not set it may create its own virtualenv). Also it is not clear to me how Robocorp code extension works within "projects" that might not have all the project files (like conda.yaml and robot.yaml) that I got by using the Robocorp: Create robot command. Realizing though that you might have a similar project structure and a conda,yml I searched their documentation to see how under a Robocorp project one adds python packages. Looks like that was the way. So in the future if you have a missing Python package or version issues then this might be the solution to resolve that instead of a straight |
Big thanks @emanlove |
|
@robottester-sketch If you are a looking for support or want to review an issue the best place to start is the Robot Framework Slack community. But if that channel is not best for you, you can open a new issue either from an existing issue like this one (1) or from the Issue link in the main repository menu above (2). Note it is best to read through and follow the issue template that is provided when you start a new issue . Doing so helps us to help you. |
Thankyou emanlove I will do so |
Issuing the command pip install selenium=4.9.1 solved the issue for me, I really was in panic with this (first time doning testing) |
Hi, I got this issue today in a new computer with python 11 with this packages:
Then I read this topic and compared with other computer that I am using for tests Now is working with this list of packages:
|
Hi @emanlove I too facing same error
|
hi guys |
@Meem12 If you are getting this error it means which ever Python is executing the script has Selenium v4.10.0 installed. If you are using a IDE with extensions you will need to configure either the Python or the Packages it installs. |
Thanks for the reply. I have another previous project script which is
running fine. I'm using Mycharm IDE. with Python version 3.11.3 and
selenium i installed 4.10.0 I even tried downgrade selenium to 09 from
command prompt but it didn't work for my new project script. Could you
elaborate a bit about this configuration thing
…On Mon, Jul 31, 2023 at 9:28 AM Ed Manlove ***@***.***> wrote:
@Meem12 <https://github.com/Meem12> If you are getting this error it
means which ever Python is executing the script has Selenium v4.10.0
installed. If you are using a IDE with extensions you will need to
configure either the Python or the Packages it installs.
—
Reply to this email directly, view it on GitHub
<#1835 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBTU2HE3BR43B5S6KVZMYBTXS6XJBANCNFSM6AAAAAAY6IVZEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
A release candidate v6.1.1rc1 has been pushed to PyPI which is intended to resolve this issue. If you have pip installed, just run
to install this release candidate or as I prefer use
to install exactly this version. The changes are all internal and very subtle. I recommend people do some check under certain conditions to verify this is working for you as it did previously based upon how you use the Please read through these thoroughly and follow the recommended verification steps before one comments. Thank you. |
Thanks a lot Manlove! I ran my previous script to finish up this sprint at
work. I'm little scared to do this upgrade command in case this would also
start failing my previous script LOL. then I'd be just doomed
…On Wed, Aug 2, 2023 at 12:09 AM Ed Manlove ***@***.***> wrote:
A release candidate v6.1.1rc1 has been pushed to PyPI which is intended to
resolve this issue. If you have pip installed, just run
pip install --pre --upgrade robotframework-seleniumlibrary
to install this release candidate or as I prefer use
pip install robotframework-seleniumlibrary==6.1.1rc1
to install exactly this version. The changes are all internal and very
subtle. I recommend people do some check under certain conditions to verify
this is working for you as it did previously based upon how you use the Open
Browser keyword. Notes about this are in the release notes for v6.1.1rc1
and can be found at
https://github.com/robotframework/SeleniumLibrary/blob/master/docs/SeleniumLibrary-6.1.1rc1.rst
Please read through these thoroughly and follow the recommended
verification steps before one comments. Thank you.
—
Reply to this email directly, view it on GitHub
<#1835 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBTU2HA74FTGXOUOPOR3Y2TXTHHGTANCNFSM6AAAAAAY6IVZEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
This has been fixed in the SeleniumLibrary v6.1.1 release. |
Thank you so much for your time for looking into this matter.
Appreciated it !!
…On Fri, Aug 4, 2023 at 9:56 AM Ed Manlove ***@***.***> wrote:
This has been fixed in the SeleniumLibrary v6.1.1 release.
—
Reply to this email directly, view it on GitHub
<#1835 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BBTU2HGX5PFLJMF47ZZF5W3XTT5SFANCNFSM6AAAAAAY6IVZEY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
For reference, this is the issue I was looking for when debugging this. 😅 I googled but I must have been doing a too bad job. (I even see now that it's one the very first page of the Google search results, and I might even have opened it, but I think that the fact that this referred to Anyway, here's the error I was seeing:
The fix in this case is one of the following:
I feel silly about having spent so much time on this, but here goes. Maybe this will help someone else out there. Take care. 👍 |
I also faced the same issue after upgrading the robot framework & some robo libraries. after I downgraded selenium & robotframework-seleniumlibrary. now it's working fine for me. used |
@nra-Dvg A few questions .. which issue in particular (as people have listed a few here)? And upgrading to which SeleniumLibrary, Selenium and Robot Framework versions? |
Hi,
When I try to run a robot test I'm getting the following error:
TypeError: WebDriver.__init__() got an unexpected keyword argument 'service_log_path'
Similar to this resolved issue: #1419
Although I'm using Chrome and I've already using the latest versions of SeleniumLibarary, Chromedriver and Robot.
python --version
Python 3.11.4
robot --version
Robot Framework 6.0.2 (Python 3.11.4 on win32)
chromedriver --version
ChromeDriver 114.0.5735.90
I've installed SeleniumLibary today via pip install --upgrade robotframework-seleniumlibrary
Chrome version: 114.0.5735.110 64 bits
The project that I'm using is this:
https://gitlab.com/bftft/robot-framework-testautomationu-2022/-/tree/main/
An exemple of test that I'm trying to run is this:
https://gitlab.com/bftft/robot-framework-testautomationu-2022/-/tree/main/005-TestCases
first-test-case.ansewer.robot
I appreciate any help.
The text was updated successfully, but these errors were encountered: