RanorexDriver problems with Selenium exceptions
Posted: Wed Feb 22, 2023 7:27 am
Hi,
In our company, we exclusively use the RanorexDriver with Python to script our test cases. We have always used a pre-release version of 9.3.2. Recently, we attempted to update to the latest version (10.2.2). Unfortunately, we encountered some strange bugs in this version, including one that completely breaks the functionality of the driver.
Whenever a Selenium exception is raised, such as a "NoSuchElementException," the RanorexDriver sends the message back in the wrong format, causing the Selenium ErrorHandler to be unable to decode the message. As a result, instead of the expected error, a KeyError is raised:
File "C:?\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:?\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 130, in check_response
status = value["status"]
~~~~~^^^^^^^^^^
KeyError: 'status'
Value is the following:
{'sessionId': '36d8e417a84d49059d4967d6092be724', 'value': {'error': 'no such element', 'message': "Element with selector '/form[@title='']//text[@caption>'Möchten Sie Ihre letzte Sitzung']' was not found (within 2000ms).", 'stacktrace': ' bei System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\r\n bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)\r\n bei System.Windows.Forms.Control.Invoke(Delegate method)\r\n bei RanorexDriver.Sta.Call[T](Func`1 func)\r\n bei RanorexDriver.RanorexDriverImpl.FindElement(String fromElementId, WebDriverFindBy by)\r\n bei RanorexDriver.Server.WebDriverController.<>c__DisplayClass18_0.<FindElement>b__0(WebDriverSession s)\r\n bei RanorexDriver.Server.Wd.TryWithSession(Func`2 func, String sid)'}}
We have attempted to resolve this issue with both a fresh install of Selenium 3.14 and Selenium 4, but encountered this error in both situations. We also tried multiple versions of python from 3.7 onwards, as well as multiple RanorexDriver versions. The only working Version is 9.3.2. This problem renders the product completely unusable for us in its current state. Is there a way to fix this issue, without modifying the error handler of Selenium?
Additionally, switching to using the Studio is not feasible for us due to the extensive library of previously created and coded test cases.
Thanks for any help!
In our company, we exclusively use the RanorexDriver with Python to script our test cases. We have always used a pre-release version of 9.3.2. Recently, we attempted to update to the latest version (10.2.2). Unfortunately, we encountered some strange bugs in this version, including one that completely breaks the functionality of the driver.
Whenever a Selenium exception is raised, such as a "NoSuchElementException," the RanorexDriver sends the message back in the wrong format, causing the Selenium ErrorHandler to be unable to decode the message. As a result, instead of the expected error, a KeyError is raised:
File "C:?\Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "C:?\Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 130, in check_response
status = value["status"]
~~~~~^^^^^^^^^^
KeyError: 'status'
Value is the following:
{'sessionId': '36d8e417a84d49059d4967d6092be724', 'value': {'error': 'no such element', 'message': "Element with selector '/form[@title='']//text[@caption>'Möchten Sie Ihre letzte Sitzung']' was not found (within 2000ms).", 'stacktrace': ' bei System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)\r\n bei System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)\r\n bei System.Windows.Forms.Control.Invoke(Delegate method)\r\n bei RanorexDriver.Sta.Call[T](Func`1 func)\r\n bei RanorexDriver.RanorexDriverImpl.FindElement(String fromElementId, WebDriverFindBy by)\r\n bei RanorexDriver.Server.WebDriverController.<>c__DisplayClass18_0.<FindElement>b__0(WebDriverSession s)\r\n bei RanorexDriver.Server.Wd.TryWithSession(Func`2 func, String sid)'}}
We have attempted to resolve this issue with both a fresh install of Selenium 3.14 and Selenium 4, but encountered this error in both situations. We also tried multiple versions of python from 3.7 onwards, as well as multiple RanorexDriver versions. The only working Version is 9.3.2. This problem renders the product completely unusable for us in its current state. Is there a way to fix this issue, without modifying the error handler of Selenium?
Additionally, switching to using the Studio is not feasible for us due to the extensive library of previously created and coded test cases.
Thanks for any help!