splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Splinter doesn't work with Selenium 4.0

Open slafs opened this issue 5 years ago • 10 comments

Selenium 4.0.0 was just released. With the latest version there are apparently some API changes that Splinter doesn't handle well.

Our issue was TypeError: __init__() got an unexpected keyword argument 'timeout' on https://github.com/cobrateam/splinter/blob/253a6f21699a60651943bac11cf87a24da4d5a81/splinter/driver/webdriver/firefox.py#L71

slafs avatar Oct 13 '21 15:10 slafs

Here's the offending commit on Selenium: https://github.com/SeleniumHQ/selenium/commit/6428ad79ca21b699837c06e84cdbe3290e4e6c52

slafs avatar Oct 13 '21 15:10 slafs

I have this issue as well as one of my machines got upgraded without knowing. ~~Any advice on how to workaround much appreciated...I'm not experienced with modifying commit/sources.~~

Update: [deleted due to OS issue / selenium install issue]

Update2: Commenting out the timeout=timeout, line fixed my particular issue.

walksonair avatar Oct 17 '21 16:10 walksonair

A workaround is to pin Selenium to a working version in your requirements. E.g. put

selenium<4.0.0

into your requirements.txt file or upgrade to splinter>=0.16.0 😄

slafs avatar Oct 18 '21 07:10 slafs

or upgrade to splinter>=0.16.0 😄

how do I do that? Whenever I run pup upgrade it keeps getting splinter==0.15.0

walksonair avatar Oct 19 '21 02:10 walksonair

or upgrade to splinter>=0.16.0 😄

how do I do that? Whenever I run pup upgrade it keeps getting splinter==0.15.0

you can try pip install --upgrade splinter or pip install "splinter>=0.16.0"

slafs avatar Oct 19 '21 08:10 slafs

Same TimeOut issue w splinter==0.16.0, thanks for assisting though.

walksonair avatar Oct 20 '21 03:10 walksonair

upgrade to splinter>=0.16.0

0.16.0 pins selenium<4 so that won't work.

This is unfortunate because file uploads don't work on Selenium 3.x on Python 3.9.

blaise-io avatar Dec 07 '21 16:12 blaise-io

@blaise-io 0.16.0's release pins selenium 3 in order to prevent dependency conflicts, it has nothing to do with getting selenium 4 to work.

Selenium 4 compatibility is coming soon-ish.

javascript-error avatar Dec 07 '21 19:12 javascript-error

0.16.0 pins selenium<4 so that won't work.

Right, the workaround I mentioned is for installing Splinter with Selenium 3.x. Not for making Splinter work with Selenium 4.x. Just to be clear.

slafs avatar Dec 08 '21 11:12 slafs

Fixed by #963

javascript-error avatar Dec 08 '21 21:12 javascript-error