无法使用量角器启动Microsoft边缘

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法使用量角器启动Microsoft边缘相关的知识,希望对你有一定的参考价值。

无法使用量角器在Windows 10上启动边缘浏览器。 edge -Microsoft Edgehtml 15.15063从https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/下载了支持的边缘驱动程序,即版本15063。

这是我的量角器conf文件。

module.exports = {

            //seleniumAddress: 'http://localhost:17556',
            keepAlive: true,
            seleniumArgs: ['-Dwebdriver.edge.driver=node_modules/protractor/node_modules/webdriver-manager/selenium/MicrosoftWebDriver.exe'],

            capabilities: {
                'browserName': 'MicrosoftEdge',
                elementScrollBehavior: 1,
                nativeEvents: false 
            },

            framework: 'jasmine2',

            jasmineNodeOpts: {
                defaultTimeoutInterval: 200000,
                isVerbose: true,
            },
        });
    }
};

启动e2e后出现错误消息:

[1

1:16:58] I/local - Starting selenium standalone server...
[11:16:59] E/launcher - Error: Error: Server terminated early with status 1
    at Error (native)
    at earlyTermination.catch.e (C:codee2e
ode_modulesselenium-webdriver
emoteindex.js:252:52)
    at process._tickCallback (internal/process/next_tick.js:109:7)
Closing report
[11:16:59] E/launcher - Process exited with error code 100
npm ERR! Windows_NT 10.0.15063
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run" "sanitytests"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR!  sanitytests: `protractor protractor-sanitytest-conf.js`
npm ERR! Exit status 100
npm ERR!
npm ERR! Failed at the sanitytests script 'protractor protractor-sanitytests-conf.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the ??? package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     protractor protractor-sanitytests-conf.js

有人可以在这里指导。

我已经更新了节点版本,现在无法使用边缘浏览器创建新服务。

(node:384) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[14:17:36] I/launcher - Running 1 instances of WebDriver
[14:17:36] I/local - Starting selenium standalone server...
[14:17:37] I/local - Selenium standalone server started at http://192.168.1.4:61872/wd/hub
[14:17:37] E/launcher - Unable to create new service: EdgeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'DESKTOP-6VHU42F', ip: '192.168.1.4', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_65'
Driver info: driver.version: unknown
[14:17:37] E/launcher - SessionNotCreatedError: Unable to create new service: EdgeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'DESKTOP-6VHU42F', ip: '192.168.1.4', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_65'
Driver info: driver.version: unknown
    at Object.checkLegacyResponse (C:codee2e	ests
ode_modulesselenium-webdriverliberror.js:546:15)
    at parseHttpResponse (C:codee2e	ests
ode_modulesselenium-webdriverlibhttp.js:509:13)
    at doSend.then.response (C:codee2e	ests
ode_modulesselenium-webdriverlibhttp.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
    at Function.createSession (C:codee2e	ests
ode_modulesselenium-webdriverlibwebdriver.js:769:24)
    at createDriver (C:codee2e	ests
ode_modulesselenium-webdriverindex.js:170:33)
    at Builder.build (C:codee2e	ests
ode_modulesselenium-webdriverindex.js:635:14)
    at Local.getNewDriver (C:codee2e	ests
ode_modulesprotractoruiltdriverProvidersdriverProvider.js:53:33)
    at Runner.createBrowser (C:codee2e	ests
ode_modulesprotractoruilt
unner.js:195:43)
    at q.then.then (C:codee2e	ests
ode_modulesprotractoruilt
unner.js:339:29)
    at _fulfilled (C:codee2e	ests
ode_modulesqq.js:834:54)
    at self.promiseDispatch.done (C:codee2e	ests
ode_modulesqq.js:863:30)
    at Promise.promise.promiseDispatch (C:codee2e	ests
ode_modulesqq.js:796:13)
    at C:codee2e	ests
ode_modulesqq.js:604:44
    at runSingle (C:codee2e	ests
ode_modulesqq.js:137:13)
    at flush (C:codee2e	ests
ode_modulesqq.js:125:13)
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)
[14:17:37] E/launcher - Process exited with error code 199
npm ERR! code ELIFECYCLE
npm ERR! errno 199
npm ERR! sanitytests: `protractor protractor-sanitytests-conf.js`
npm ERR! Exit status 199
npm ERR!
npm ERR! Failed at the sanitytests script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
答案

您有旧的节点版本。使用命令更新到最新版本:

npm update npm -g

以上是关于无法使用量角器启动Microsoft边缘的主要内容,如果未能解决你的问题,请参考以下文章

在离线模式下安装量角器 - webdriver-manager启动错误 - 我做错了什么

量角器“ - 失败:无法读取null的属性'ver'

无法使用量角器单击页面右侧的“登录”链接

量角器 .sendKeys() 无法使用 ngModel 处理输入

无法在量角器中读取未定义的属性“ARROW_DOWN”

使用 Microsoft.Web.Administration 后无法启动 IIS Express Web 服务器