You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
u 'result': {
u 'exceptionDetails': {
u 'columnNumber': 53,
u 'exception': {
u 'className': u 'DOMException',
u 'subtype': u 'error',
u 'type': u 'object',
u 'description': u 'DOMException: Failed to execute \'evaluate\' on \'Document\': The string \'.//*[text()="\u6240\u6709\u8ba2\u5355"\' is not a valid XPath expression.\n at <anonymous>:1:54',
u 'objectId': u '{"injectedScriptId":7,"id":2}'
},
u 'text': u 'Uncaught',
u 'exceptionId': 1,
u 'scriptId': u '317',
u 'lineNumber': 0
},
u 'result': {
u 'className': u 'DOMException',
u 'subtype': u 'error',
u 'type': u 'object',
u 'description': u 'DOMException: Failed to execute \'evaluate\' on \'Document\': The string \'.//*[text()="\u6240\u6709\u8ba2\u5355"\' is not a valid XPath expression.\n at <anonymous>:1:54',
u 'objectId': u '{"injectedScriptId":7,"id":1}'
}
}
}
The text was updated successfully, but these errors were encountered:
代码部分,如下has_all_tab_cur 结果为true,实际看了日志才发现其实是没有找到元素的。
C:\Python27\Lib\site-packages\fastAutoTest\core\h5\h5Engine.py 方法 isElementExist 增加resultValueDict = self._networkHandler.send(getExistCmd).getResponse()[0]结果打印
日志:
分析:
resultValueDict 返回结果的json数据如下,其中 resultValueDict['result']['result']['subtype']值为‘error’。源码中只判断了resultType != 'null',导致返回结果为true。使用者在未打开日志的场景下,并不知道自己的xpath expression 是错误的,还以为是找到了元素,这对结果的判断是不准确的。
The text was updated successfully, but these errors were encountered: