-
Notifications
You must be signed in to change notification settings - Fork 112
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
Listener errors in console: selenium.webdriver.chrome.webdriver.WebDriver is not JSON serializable #32
Comments
Of course, monkey-patching can be used to avoid this, but the issue may occur in the future for other corner cases. |
Few questions about software version, which You are using :)
|
RED - Robot Editor version 0.6.5 0.6.5.201607071059 |
However, the issue is in My workaround was to use http://stackoverflow.com/questions/18478287/making-object-json-serializable-with-regular-encoder to make selenium.webdriver.chrome.webdriver.WebDriver JSON serializable. |
We just think about modify a little bit The reason is that we do not depends on The correction will be available in new upcome release. Information about listener API: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html#id760 |
Thank you for the pointers, it works just fine on my pc. |
Just for update, I checked it deeply and this issue is mainly connected to wrapping a call BuiltIn().run_keyword(self, name, args*) inside keyword call by user, where class User(object):
def __init__(self, name, password):
self.name = name
self.password = password
kepler = User('A. Kepler', 'secret')
from robot.libraries.BuiltIn import BuiltIn
class KeywordLibrary:
def keyword(self, name):
pass
def call_keyword(self):
return BuiltIn().run_keyword("keyword", {"name": kepler}) the corresponding test case is very simple: *** Settings ***
Library KeywordLibrary.py
*** Test Cases ***
T1
Call Keyword The issue is also reproduce even Selenium is not used. |
I have encountered the same issue, and the suggested C:\Python27\lib\site-packages\robotide\contrib\testrunner\TestRunnerAgent.py alteration has the desired effect for RIDE, but sadly doesn't work with RED. It seems to me that RED actually creates the TestRunnerAgent.py file from a different source as it refers to a temp file: C:\Users[user]\AppData\Local\Temp\RobotTempDir2655008392341869025\TestRunnerAgent.py. Does anyone know where to locate the original file? When altering this temporary version, the errors do disappear, so when I have access to the original file it could be permanent. Otherwise after every RED application restart I have to do this again. |
It is inside one of the jars (in my case it was
in org.robotframework.ide.core-functions-0.0.1-SNAPSHOT.jar)
|
Thanks. That should help. Will let you know tomorrow if that works for me. |
@kootstra RED does not use the agent provided with RIDE. We provide our own version of it (modified version of what RIDE uses) which is located in the jar mentioned by @alexandrul. Upcoming RED release will of course provide the fix in agent code (we expect to release new version within 1-2 weeks). |
@michalanglart from the logs I already understood that the file is generated from one of the classes and does not use the one in Python directory. After updating the TestRunnerAgent.py file in the org.robotframework.ide.core-functions-0.0.1-SNAPSHOT.jar class the errors dissapear. However, the debug functionality also no longer works. So, I guess that is one step forward, and two steps back. |
@kootstra Please download updated version, which will be included in new release: https://gist.githubusercontent.com/adam-wypych/4e23e33f051f7bd0713fcdbe8e17c733/raw/e7367b57254d94d22d01be46e72aad377b4c29b0/TestRunnerAgent.py . |
@adam-wypych Thanks. That indeed works. Looking forward to the new release. |
released in 0.7.0 |
Using the
Add Location Strategy
keyword leads to multiple errors in both console and message logs.Similar issue encountered in RIDE, which is using a similar
TestRunnerAgent.py
: https://github.com/robotframework/Selenium2Library/issues/542Console errors:
Message log traceback:
The text was updated successfully, but these errors were encountered: