SeleniumLibrary: Incompatibility with forthcoming RF 2.9 alpha 3
That I get this exception when using Selenium2Library with the latest Robot Framework code:
Importing test library 'Selenium2Library' failed: ImportError: cannot import name GLOBAL_VARIABLES
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/__init__.py", line 2, in <module>
from keywords import *
File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/keywords/__init__.py", line 1, in <module>
from _logging import _LoggingKeywords
File "/usr/local/lib/python2.7/dist-packages/Selenium2Library/keywords/_logging.py", line 3, in <module>
from robot.variables import GLOBAL_VARIABLES
Apparently the library uses Robot’s internal GLOBAL_VARIABLES that we just we able to remove as part of robotframework/robotframework#532. I don’t have time to investigate where and why GLOBAL_VARIABLES are used right now, but I hope the usage could be replaced with something else. I would assume variable related methods in BuiltIn could be used instead. A big benefit of them is that they are part of the public API and thus considered stable.
If it turns out to be hard to fix this on Se2Lib, we can consider adding GLOBAL_VARIABLES back for some time. Our general goal is to get rid of all/most global state like that to make the framework thread safe and easier to parallelize, though.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 30 (20 by maintainers)
There are requirements for pip, but we want and we are keep our backwards compatibility. And therefore the requirements are quite low. But there are few these kind of situations which causes a problem and those could be documented better. If you feel that this is a problem, please raise an separate issue for it.