splinter icon indicating copy to clipboard operation
splinter copied to clipboard

Config cannot be imported

Open ctasca opened this issue 3 years ago • 5 comments

I have just installed today splinter via pip at the latest version and the config.py is missing from it as well as from init.py

if I do "from splinter import Browser, Config" ...Config is not found

from splinter import Browser, Config ImportError: cannot import name 'Config' from 'splinter' (/Library/Python/3.9/lib/python/site-packages/splinter/init.py)

ctasca avatar Mar 30 '23 11:03 ctasca

You should import config from splinter.config. Curious on why you expect it to be available in splinter. Are you following any docs? If so, we should fix it.

fsouza avatar Mar 31 '23 15:03 fsouza

The config.py was completely missing from the package when installed via pip. I had to clone the repo in site-packages and solved it this way. I was following the doc at https://splinter.readthedocs.io/en/latest/config.html

ctasca avatar Mar 31 '23 16:03 ctasca

Hmm that's because config is only available on master, it hasn't been released yet. I guess the bug is that latest points to master instead of the most recent tag? 🤔

fsouza avatar Mar 31 '23 18:03 fsouza

It is surely a nice feature to have Config and being able to set fullscreen mode. Maybe can you suggest how it can be done without using Config on Chrome webdriver? Or at least being able to set the browser window size?

ctasca avatar Apr 01 '23 09:04 ctasca

Closing this issue since the Config object is available in the latest Splinter version.

javascript-error avatar Feb 13 '24 19:02 javascript-error