有人可以帮助我确定这是什么错误。我所有的测试用例都通过了Chrome,并且在IE中我在getText()上收到了类似这样的随机错误,我不明白这是什么。
应比较检查总答复 信息: WebDriverError:无法从以下类型确定类型:E。最后1个字符为:E 构建信息:版本:'3.14.0',修订版本:'aacccce0',时间:'2018-08-02T20:13:22.693Z' 系统信息:操作系统名称:Windows 10,操作系统架构:amd64,操作系统版本:10.0,Java版本:10.0.1 驱动程序信息:driver.version:未知 堆: WebDriverError:无法从以下类型确定类型:E。最后1个字符为:E 构建信息:版本:'3.14.0',修订版本:'aacccce0',时间:'2018-08-02T20:13:22.693Z' 系统信息:操作系统名称:Windows 10,操作系统架构:amd64,操作系统版本:10.0,Java版本:10.0.1 驱动程序信息:driver.version:未知
at Object.checkLegacyResponse (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.findElements(By(xpath, //qms-percentage-widget//div[@id='F2']//div[@class='default-widget']))
at thenableWebDriverProxy.schedule (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at thenableWebDriverProxy.findElements (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:1048:19)
at ptor.waitForAngular.then (C:\AppData\Roaming\npm\node_modules\protractor\built\element.js:159:44)
at ManagedPromise.invokeCallback_ (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1376:14)
at TaskQueue.execute_ (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)Error
at ElementArrayFinder.applyAction_ (C:\AppData\Roaming\npm\node_modules\protractor\built\element.js:459:27)
at ElementArrayFinder.(anonymous function).args [as getText] (C:AppData\Roaming\npm\node_modules\protractor\built\element.js:91:29)
at ElementFinder.(anonymous function).args [as getText] (C:\AppData\Roaming\npm\node_modules\protractor\built\element.js:831:22)
at _onSuccess .js:79:23)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
答案 0 :(得分:0)
根据此异常,尝试通过xpath查找元素时测试失败:
WebDriver.findElements(By(xpath, //qms-percentage-widget//div[@id='F2']//div[@class='default-widget']))