问题
I reopened my question related on answer issue.
So I setup the protractor and cucumber framework.
I tried to launch the tests but I get the error message:
E/launcher - BUG: launcher exited with 1 tasks remaining
- protractor protractor.conf.js output
C:\obw\IVO_Workspace\mui-cpin-lb-spa\i\Cucumber>protractor protractor.conf.js
(node:11656) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmp
dir() instead.
[11:33:00] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[11:33:00] I/launcher - Running 1 instances of WebDriver
[11:33:02] E/launcher - BUG: launcher exited with 1 tasks remaining
C:\obw\IVO_Workspace\mui-cpin-lb-spa\i\Cucumber>
- webdriver-manager start output
This is the output of the webdriver when I launched the protractor protractor.conf.js file command on the CLI:
C:\obw\IVO_Workspace\mui-cpin-lb-spa>webdriver-manager start
[11:30:43] I/start - java -Dwebdriver.chrome.driver=C:\obw\usr\npm\node_modules\
protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26.exe -Dwebdr
iver.gecko.driver=C:\obw\usr\npm\node_modules\protractor\node_modules\webdriver-
manager\selenium\geckodriver-v0.11.1.exe -jar C:\obw\usr\npm\node_modules\protra
ctor\node_modules\webdriver-manager\selenium\selenium-server-standalone-2.53.1.j
ar -port 4444
[11:30:43] I/start - seleniumProcess.pid: 10372
11:30:44.197 INFO - Launching a standalone Selenium Server
11:30:44.291 INFO - Java: IBM Corporation 2.6
11:30:44.291 INFO - OS: Windows 7 6.1 amd64
11:30:44.291 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
11:30:44.338 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:30:44.338 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered
11:30:44.353 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped:
registration capabilities Capabilities [{platform=MAC, browserName=safari, versi
on=}] does not match the current platform VISTA
11:30:44.353 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUni
tDriver
11:30:44.353 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver
is not registered
11:30:44.369 INFO - Version Jetty/5.1.x
11:30:44.385 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
11:30:44.385 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:30:44.385 INFO - Started HttpContext[/,/]
11:30:44.525 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@b744f8
a0
11:30:44.525 INFO - Started HttpContext[/wd,/wd]
11:30:44.541 INFO - Started SocketListener on 0.0.0.0:4444
11:30:44.541 INFO - Started org.openqa.jetty.jetty.Server@cd61407
11:30:44.541 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
11:30:44.541 INFO - Selenium Server is up and running
11:33:00.662 INFO - Executing: [new session: Capabilities [{count=1, browserName
=chrome}]])
11:33:00.678 INFO - Creating a new session for Capabilities [{count=1, browserNa
me=chrome}]
Starting ChromeDriver 2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30) on
port 16569
Only local connections are allowed.
11:33:02.223 INFO - Done: [new session: Capabilities [{count=1, browserName=chro
me}]]
11:33:02.235 INFO - Executing: [set script timeout: 500000])
11:33:02.241 INFO - Done: [set script timeout: 500000]
Here is the webdriver output after launching protractor.
- protractor.conf.js file contents
This the content of the configuration.js file related to the protractor launch:
// protractor.conf.js
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
getPageTimeout: 60000,
allScriptsTimeout: 500000,
framework: 'custom',
// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to this directory.
specs: [
'features/*.feature'
],
baseURL: 'http://localhost:8080/',
cucumberOpts: {
require: 'features/step_definitions/my_step_definitions.js',
tags: false,
format: 'pretty',
profile: false,
'no-source': true
}
};
- Test.feature file content
The feature file contents:
Feature: Running Cucumber with Protractor
As a user of Protractor
I should be able to use Cucumber
to run my E2E tests
Scenario: Wrapping WebDriver
Given I go on "index.html"
Then the title should equal "My AngularJS App"
- The step definition file content
//http://chaijs.com/
var chai = require('chai');
//https://github.com/domenic/chai-as-promised/
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);
var expect = chai.expect;
module.exports = function() {
this.Given(/^I go on "([^"]*)"$/, function (arg1, callback) {
// Write code here that turns the phrase above into concrete actions
browser.get('http://localhost:9001');
callback()
});
this.Then(/^the title should equal "([^"]*)"$/, function (arg1, callback) {
// Write code here that turns the phrase above into concrete actions
expect(browser.getTitle()).to.eventually.equal(arg1).and.notify(callback);
});
}
Versions:
- npm 5.3.0
- node 8.0.0
- protractor 4.0.13
- selenium webdriver 2.53.1
Please help on this one, I have no idea how to fix this.
来源:https://stackoverflow.com/questions/45814165/bug-launcher-exited-with-1-task-remaining-protractor-cucumber