Unable to launch Microsoft edge with protractor

巧了我就是萌 提交于 2019-12-11 16:31:35

问题


Unable to launch edge browser on windows 10 with protractor. edge -Microsoft EdgeHTML 15.15063 downloaded the supported edge driver from https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/ i.e Release 15063.

here is my protractor conf file.

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,
            },
        });
    }
};

Error message post launch the 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:\code\e2e\node_modules\selenium-webdriver\remote\index.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

Could anyone please guide here.

I have updated the node version, now getting unable to create a new service with edge browser.

(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:\code\e2e\tests\node_modules\selenium-webdriver\lib\error.js:546:15)
    at parseHttpResponse (C:\code\e2e\tests\node_modules\selenium-webdriver\lib\http.js:509:13)
    at doSend.then.response (C:\code\e2e\tests\node_modules\selenium-webdriver\lib\http.js:441:30)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
    at Function.createSession (C:\code\e2e\tests\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
    at createDriver (C:\code\e2e\tests\node_modules\selenium-webdriver\index.js:170:33)
    at Builder.build (C:\code\e2e\tests\node_modules\selenium-webdriver\index.js:635:14)
    at Local.getNewDriver (C:\code\e2e\tests\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
    at Runner.createBrowser (C:\code\e2e\tests\node_modules\protractor\built\runner.js:195:43)
    at q.then.then (C:\code\e2e\tests\node_modules\protractor\built\runner.js:339:29)
    at _fulfilled (C:\code\e2e\tests\node_modules\q\q.js:834:54)
    at self.promiseDispatch.done (C:\code\e2e\tests\node_modules\q\q.js:863:30)
    at Promise.promise.promiseDispatch (C:\code\e2e\tests\node_modules\q\q.js:796:13)
    at C:\code\e2e\tests\node_modules\q\q.js:604:44
    at runSingle (C:\code\e2e\tests\node_modules\q\q.js:137:13)
    at flush (C:\code\e2e\tests\node_modules\q\q.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.

回答1:


You have old node version. Update to latest with command:

npm update npm -g


来源:https://stackoverflow.com/questions/47766363/unable-to-launch-microsoft-edge-with-protractor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!