8.1.35.1.24.2.6Chrome 59.0.3071.115 (Official Build) (64-bit)Windows 10 Pro x64// https://github.com/angular/protractor/blob/master/lib/config.ts
const { SpecReporter } = require('jasmine-spec-reporter');
exports.config = {
allScriptsTimeout: 11000,
specs: [
'./e2e/**/*.e2e-spec.ts'
],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
framework: 'jasmine',
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function () {
}
},
onPrepare() {
require('ts-node').register({
project: 'e2e/tsconfig.e2e.json'
});
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
}
};
import { browser, element, by } from 'protractor';
export class HomePage {
navigateTo() {
return browser.get('/');
}
getParagraphTitle() {
return element(by.css('phx-app h1')).getText();
}
getParagraphText() {
return element(by.css('phx-app p')).getText();
}
}
import { HomePage } from './app.po';
describe('Phenomenex Home Page', () => {
let page: HomePage;
beforeEach(() => {
page = new HomePage();
});
it('h1 tag', () => {
page.navigateTo();
expect(page.getParagraphTitle()).toEqual(<any>'This is an example header');
});
it('p tag', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual(<any>'This example is a quick exercise to illustrate how the default, static and fixed to top navbar work. It includes the responsive CSS and HTML, so it also adapts to your viewport and device.');
});
});
md5-a94f2cdcecb2eb2e8368f31c50285b00
H:\d>npm run e2e
> [email protected] pree2e H:\d
> webdriver-manager update --versions.chrome=2.24
[09:01:02] I/update - chromedriver: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.24.zip
[09:01:02] I/update - chromedriver: unzipping chromedriver_2.24.zip
[09:01:03] I/update - chromedriver: chromedriver_2.24.exe up to date
[09:01:03] I/update - selenium standalone: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.4.0.jar
[09:01:03] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[09:01:03] I/update - geckodriver: file exists H:\d\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.18.0.zip
[09:01:03] I/update - geckodriver: unzipping geckodriver-v0.18.0.zip
[09:01:04] I/update - geckodriver: geckodriver-v0.18.0.exe up to date
> [email protected] e2e H:\d
> protractor ./protractor.conf.js
(node:17812) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[09:01:15] I/launcher - Running 1 instances of WebDriver
[09:01:15] I/direct - Using ChromeDriver directly...
[09:01:16] E/launcher - Server terminated early with status 1
[09:01:16] E/launcher - Error: Server terminated early with status 1
at earlyTermination.catch.e (H:\d\node_modules\selenium-webdriver\remote\index.js:252:52)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
From: Task: WebDriver.createSession()
at Function.createSession (H:\d\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (H:\d\node_modules\selenium-webdriver\chrome.js:709:29)
at Direct.getNewDriver (H:\d\node_modules\protractor\built\driverProviders\direct.js:77:33)
at Runner.createBrowser (H:\d\node_modules\protractor\built\runner.js:195:43)
at q.then.then (H:\d\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (H:\d\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (H:\d\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (H:\d\node_modules\protractor\node_modules\q\q.js:796:13)
at H:\d\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (H:\d\node_modules\protractor\node_modules\q\q.js:137:13)
[09:01:16] E/launcher - Process exited with error code 199
npm ERR! code ELIFECYCLE
npm ERR! errno 199
npm ERR! [email protected] e2e: `protractor ./protractor.conf.js`
npm ERR! Exit status 199
npm ERR!
npm ERR! Failed at the [email protected] e2e script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ChrisR\AppData\Roaming\npm-cache\_logs\2017-07-13T16_01_17_788Z-debug.log
md5-8636cd6fb482c870895884fea2728432
npm i -g @angular/cli
ng new t
cd t
ng e2e
I am behind a firewall if that matters, running on localhost.
Which version of Chrome are you using? If you are using the latest version (59) then you should chromedriver 2.30. You are using 2.24 and this could cause a problem
okay now scripts is this:
"pree2e": "webdriver-manager",
"e2e": "protractor ./protractor.conf.js"
error is still the same.
webpack: Compiled successfully.
[11:39:35] I/update - chromedriver: unzipping chromedriver_2.30.zip
[11:39:37] I/launcher - Running 1 instances of WebDriver
[11:39:37] I/direct - Using ChromeDriver directly...
[11:39:38] E/launcher - Server terminated early with status 1
[11:39:38] E/launcher - Error: Server terminated early with status 1
at earlyTermination.catch.e (H:\d\node_modules\selenium-webdriver\remote\index.js:252:52)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:169:7)
From: Task: WebDriver.createSession()
at Function.createSession (H:\d\node_modules\selenium-webdriver\lib\webdriver.js:777:24)
at Function.createSession (H:\d\node_modules\selenium-webdriver\chrome.js:709:29)
at Direct.getNewDriver (H:\d\node_modules\protractor\built\driverProviders\direct.js:77:33)
at Runner.createBrowser (H:\d\node_modules\protractor\built\runner.js:195:43)
at q.then.then (H:\d\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (H:\d\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (H:\d\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (H:\d\node_modules\protractor\node_modules\q\q.js:796:13)
at H:\d\node_modules\protractor\node_modules\q\q.js:556:49
at runSingle (H:\d\node_modules\protractor\node_modules\q\q.js:137:13)
at flush (H:\d\node_modules\protractor\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:95:7)
at process._tickCallback (internal/process/next_tick.js:161:9)
[11:39:38] E/launcher - Process exited with error code 199
Ok, one last check. As far as I know Protractor hasn't officially supported NodeJS 8. What happens if you downgrade to 6.9 and use a clean install of the project?
Just dit the following on my local machine. I cloned the example-project.
Added a this to the package.json
"pretest.example":"webdriver-manager update",
"test.example":"node ./bin/protractor example/conf.js"
And started running with npm run test.example. The test started a browser and this is my loggin
✘ ~/wswebcreation/protractor master ●✚ npm run test.example
> [email protected] pretest.example /Users/wswebcreation/protractor
> webdriver-manager update
webdriver-manager: using local installed version 12.0.6
[21:07:47] I/update - chromedriver: file exists /Users/wswebcreation/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.30.zip
[21:07:47] I/update - chromedriver: unzipping chromedriver_2.30.zip
[21:07:47] I/update - chromedriver: setting permissions to 0755 for /Users/wswebcreation/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.30
[21:07:47] I/update - chromedriver: chromedriver_2.30 up to date
[21:07:47] I/update - selenium standalone: file exists /Users/wswebcreation/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-3.4.0.jar
[21:07:47] I/update - selenium standalone: selenium-server-standalone-3.4.0.jar up to date
[21:07:48] I/update - geckodriver: file exists /Users/wswebcreation/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0.tar.gz
[21:07:48] I/update - geckodriver: unzipping geckodriver-v0.18.0.tar.gz
[21:07:48] I/update - geckodriver: setting permissions to 0755 for /Users/wswebcreation/protractor/node_modules/webdriver-manager/selenium/geckodriver-v0.18.0
[21:07:48] I/update - geckodriver: geckodriver-v0.18.0 up to date
> [email protected] test.example /Users/wswebcreation/protractor
> node ./bin/protractor example/conf.js
(node:67171) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[21:07:49] I/launcher - Running 1 instances of WebDriver
[21:07:49] I/local - Starting selenium standalone server...
[21:07:50] I/local - Selenium standalone server started at http://192.168.1.16:57722/wd/hub
Started
...
3 specs, 0 failures
Finished in 7.065 seconds
I would say this is a local problem and would suggest you to ask this question StackOverflow or Gitter because it has a bigger public. Please ask a question there with the 'protractor' tag or post in the Gitter Channel to get help.
From the the getting help section of the README:
Please ask usage and debugging questions on StackOverflow
(use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)
I'm gonna close it for now.
Thanks!
@wswebcreation any advise on how my IT can troubleshoot this?
First check it with the example project in a non work environment, like home, or a different computer. It should work there. Then check what the difference is between the networks (firewalls / proxies and so on) or install / folder rights on you computer and fix them.
@wswebcreation can you give a try with directConnect: true in the protractor.conf.js
@rakeshnambiar , it worked for me. Thanks!
Most helpful comment
@wswebcreation can you give a try with
directConnect: truein theprotractor.conf.js