gpt4 book ai didi

firefox - mouseMove 在 Firefox 中不起作用;不允许提供 http 方法

转载 作者:行者123 更新时间:2023-12-02 18:26:50 30 4
gpt4 key购买 nike

mouseMove 无法在带有最新版本的 Firefox、geckodriver 和 protractor 的 Firefox 中运行。相同的代码适用于 chrome 77

我有以下环境:

Node: v10.16.3

Protractor: 5.4.2

Geckodriver: v0.25.0

firefox: 69.0.1 (64-bit)

browser.actions().mouseMove(element(by.xpath('//app-admin-panel/div/div/div/div[2]/table/tbody/tr/td[1]'))).perform();

此代码片段应将鼠标悬停在指定元素上,但它会引发以下错误:

  Message:
Failed: HTTP method not allowed
Stack:
WebDriverError: HTTP method not allowed
at parseHttpResponse (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:536:11)
at doSend.then.response (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: mouseMove
at Driver.schedule (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:807:17)
at actions.map.action (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:124:23)
at Array.map (<anonymous>)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:123:29
at TaskQueue.execute_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2927:27)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
at process._tickCallback (internal/process/next_tick.js:68:7)
From: Task: ActionSequence.perform
at ActionSequence.perform (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\actions.js:122:33)
at UserContext.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:39:207)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:112:25
at new ManagedPromise (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:1077:7)
at ControlFlow.promise (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2505:12)
at schedulerExecute (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:95:18)
at TaskQueue.execute_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3084:14)
at TaskQueue.executeNext_ (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:3067:27)
at asyncRun (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:2974:25)
at C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\promise.js:668:7
From: Task: Run it("Make a Copy of Dashboard") in control flow
at UserContext.<anonymous> (C:\Users\Hassan Sohail\AppData\Roaming\npm\node_modules\protractor\node_modules\jasminewd2\index.js:94:19)
From asynchronous test:
Error
at Suite.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:38:5)
at Object.<anonymous> (E:\Office\Protractor\Wallboard\Smoketest.js:2:1)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

4 specs, 1 failure
Finished in 21.836 seconds

[11:41:20] I/launcher - 0 instance(s) of WebDriver still running
[11:41:20] I/launcher - firefox #01 failed 1 test(s)
[11:41:20] I/launcher - overall: 1 failed spec(s)
[11:41:20] E/launcher - Process exited with error code 1

最佳答案

这是 FF 的一个已知问题(不确定他们是否已修复)。我建议你使用这个https://www.npmjs.com/package/protractor-firefox-support

关于firefox - mouseMove 在 Firefox 中不起作用;不允许提供 http 方法,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58092837/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com