-
Notifications
You must be signed in to change notification settings - Fork 83
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
Error importing SeleniumLibrary #55
Comments
There are actually two bugs here: blindly using inspect.getmembers() with static libraries and the fact that this method is called at all with hybrid and dynamic libraries such as SeleniumLibrary. I explain them below. = Using
The problem can be avoided by not using One thing to take into account is that is that PythonLibCore only allows using new style classes (and modules) as libraries but there are no such restriction here. Thus the exact code linked above doesn't work, but using = Hybdic and dynamic libraries calling SeleniumLibrary is a dynamic library and they, similarly as hybrid libraries, expose their keywords using This problem happens because |
Because there are two bugs, we probably should also have two bug reports. Fixing the problem with |
|
Thats the changes I did to make dynamic libs work. |
As a background, I have to use .net Robot Framework, because some complex testing libraries are .net based. So my idea was to use robotremoteserver to also utilize SeleniumLibrary (not supported by .net rf).
This yields
RobotRemoteServer(SeleniumLibrary()) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 73, in __init__ self._library = RemoteLibraryFactory(library) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 259, in RemoteLibraryFactory return DynamicRemoteLibrary(library, get_keyword_names, run_keyword) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 362, in __init__ HybridRemoteLibrary.__init__(self, library, get_keyword_names) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 355, in __init__ StaticRemoteLibrary.__init__(self, library) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 280, in __init__ self._names, self._robot_name_index = self._get_keyword_names(library) File "/usr/local/lib/python3.7/site-packages/robotremoteserver.py", line 285, in _get_keyword_names for name, kw in inspect.getmembers(library): File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py", line 341, in getmembers value = getattr(object, key) File "/usr/local/lib/python3.7/site-packages/SeleniumLibrary/__init__.py", line 415, in driver raise NoOpenBrowser('No browser is open.') SeleniumLibrary.errors.NoOpenBrowser: No browser is open.
Similar error also with python 2.7.
According to Tatu Aaltonen and Pekka Klärck, there's a bug in remote server.
The text was updated successfully, but these errors were encountered: