在Mojave OS上与safari 12一起使用时,npm selenium-webdriver面临的问题

时间:2018-08-01 10:41:41

标签: node.js selenium selenium-webdriver

在执行脚本时,出现以下错误堆栈。

Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/atoms/error.js:113
  var template = new Error(this.message);
                 ^
UnknownCommandError: The command 'POST /session/B0FA0469-22EC-4DF7-B5FC-5E59010C2448/timeouts/async_script' was not found.
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:33:15.31Z'
System info: host: 'BHUKRK6742D.local', ip: '10.118.240.6', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14', java.version: '1.8.0_181'
Driver info: driver.version: unknown
    at new bot.Error (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/atoms/error.js:113:18)
    at Object.bot.response.checkResponse (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/atoms/response.js:106:9)
    at /Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:362:20
    at /Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/goog/base.js:1582:15
    at webdriver.promise.ControlFlow.runInNewFrame_ (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:1654:20)
    at notify (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:465:12)
    at notifyAll (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:442:7)
    at resolve (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:420:7)
    at webdriver.promise.Task_.fulfill (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:535:5)
    at /Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/promise.js:1520:10
==== async task ====
WebDriver.manage().timeouts().setScriptTimeout(11000)
    at webdriver.WebDriver.schedule (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:345:15)
    at webdriver.WebDriver.Timeouts.setScriptTimeout (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/selenium-webdriver/lib/webdriver/webdriver.js:1301:23)
    at Runner.createBrowser (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/protractor/lib/runner.js:181:30)
    at /Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/protractor/lib/runner.js:246:21
    at _fulfilled (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/q/q.js:759:13)
    at /Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/q/q.js:573:44
    at flush (/Users/apple/Desktop/Jetty_Upgrade/QA-Operations-Niagara/QA_P2P/node_modules/q/q.js:108:17)
[launcher] Process exited with error code 1

对这个错误有任何想法吗?甚至没有加载浏览器。

1 个答案:

答案 0 :(得分:0)

+1我有同样的问题。似乎特定于硒和莫哈韦沙漠。除了这篇文章,我在互联网上没有发现其他与此错误相关的信息。