Skip to content

Incompatibility with forthcoming RF 2.9 alpha 3 #429

@pekkaklarck

Description

@pekkaklarck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions