Coder Social home page Coder Social logo

protractor-cucumber-framework / protractor-cucumber-framework Goto Github PK

View Code? Open in Web Editor NEW
198.0 25.0 132.0 2.71 MB

Cucumber framework plugin for Protractor

License: MIT License

JavaScript 87.41% HTML 8.42% Gherkin 4.17%
protractor cucumber protractor-cucumber-framework angular

protractor-cucumber-framework's Introduction

Protractor Cucumber Framework

Follow Serenity/JS on LinkedIn Watch Serenity/JS on YouTube Join Serenity/JS Community Chat Support Serenity/JS on GitHub

NPM Version Known Vulnerabilities download-count open-issues contributors

Build Status Libraries.io dependency status for latest release, scoped npm package Serenity/JS on StackOverflow

This framework was originally part of angular/protractor and is now a separate module to decouple cucumber.js.

The project relies on Serenity/JS to enable integration between Protractor and Cucumber 1.x - 10.x and offer support for both Cucumber.js-native and Serenity/JS reporters.

To see Serenity/JS reports in action, check out the reference implementation and the Serenity BDD reports it produces.

Learn more:

๐Ÿ“ฃ Protractor has reached its end-of-life, migrate your tests to Serenity/JS ๐Ÿ’ก

Serenity/JS offers a smooth transition for your Protractor tests, allowing you to migrate them gradually to WebdriverIO or Playwright while ensuring your test suite continues to work.

Learn more about migrating from Protractor to Serenity/JS and chat with the Serenity/JS community if you have any questions about the migration.

Installation

To install this module, run the following command in your computer terminal:

npm install --save-dev protractor-cucumber-framework

Please note that to use protractor-cucumber-framework you'll need a recent Long-Term Support versions of Node.js, so 16, 18, or 20.

Odd-numbered Node.js releases (17, 19, 21, etc.) are not on the LTS line, should be considered experimental, and should not be used in production.

Upgrading from previous versions and backward compatibility

protractor-cucumber-framework is a thin wrapper around @serenity-js/cucumber and @serenity-js/protractor modules.

Just like Serenity/JS, this module:

  • supports all the major versions of Cucumber.js,
  • supports both Protractor v5 and v7,
  • is backward compatible with previous major versions of protractor-cucumber-framework.

To stay up to date with the latest features, patches, and security fixes make sure to always use the latest version of protractor-cucumber-framework as this module offers backward compatibility with other dependencies, like cucumber, @cucumber/cucumber, or protractor.

Configuration

To use protractor-cucumber-framework, configure it as a custom framework in your protractor.conf.js:

exports.config = {
    // set to "custom" instead of cucumber.
    framework: 'custom',

    // path relative to the current config file
    frameworkPath: require.resolve('protractor-cucumber-framework'),

    // require feature files
    specs: [
        'path/to/feature/files/**/*.feature' // accepts a glob
    ],

    cucumberOpts: {
        // require step definitions
        require: [
            'features/step_definitions/**/*.steps.js', // accepts a glob
            'features/support/*.ts',
        ]
    }
};

Using TypeScript

Cucumber step definitions can be implemented in TypeScript and transpiled in memory to JavaScript via ts-node.

To use TypeScript, install the following dependencies:

npm install --save-dev typescript ts-node @types/node

Next, create a tsconfig.json file in the root directory of your project:

{
  "compilerOptions": {
    "target": "ES2019",
    "lib": [
      "ES2019"
    ],
    "module": "commonjs",
    "moduleResolution": "node",
    "sourceMap": true,
    "declaration": false
  },
  "include": [
    "features/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ]
}

Finally, set the cucumberOpts.requireModule option in protractor.conf.js to ts-node/register and configure Cucumber to load .ts files instead of .js:

exports.config = {
    framework: 'custom',
    frameworkPath: require.resolve('protractor-cucumber-framework'),

    specs: [
        'features/**/*.feature'
    ],

    cucumberOpts: {
        require: [
            'features/step_definitions/**/*.steps.ts',  // *.ts instead of *.js
            'features/support/*.ts',
        ],
        requireModule: [
            'ts-node/register'  // use ts-node to transpile TypeScript in memory
        ],
    },
};

You can now implement Cucumber step definitions in TypeScript, for example:

// features/step_definitions/example.steps.ts
import { When, Then } from '@cucumber/cucumber'

When('developers like type safety', () => {
    
});

Then('they should use TypeScript', () => {

});

Using Serenity/JS directly

Since protractor-cucumber-framework is just a thin wrapper around Serenity/JS modules, you can depend on them directly to make sure you always get the latest and greatest features.

To configure your project to use Serenity/JS, remove the dependency on protractor-cucumber-framework and install the following dependencies instead:

npm install --save-dev @serenity-js/{core,cucumber,web,protractor}

Next, configure your protractor.conf.js file as follows:

exports.config = {
    framework:      'custom',
    frameworkPath:  require.resolve('@serenity-js/protractor/adapter'),

    serenity: {
        runner: 'cucumber',
        crew: [
            // Serenity/JS reporting services
        ]
    },

    cucumberOpts: {
        // Cucumber config
    }
    
    // other Protractor config
};

Using Serenity/JS reporting services

To use Serenity/JS reporting services, configure your project to depend on Serenity/JS directly as per the previous section to make sure that your Serenity/JS dependencies are up-to-date and compatible.

Using Serenity/JS console reporter

To use Serenity/JS console reporter, install the following dependencies:

npm install --save-dev @serenity-js/{core,cucumber,web,protractor,console-reporter}

Next, configure your protractor.conf.js as follows:

const { ConsoleReporter } = require('@serenity-js/console-reporter');

exports.config = {
    framework:      'custom',
    frameworkPath:  require.resolve('@serenity-js/protractor/adapter'),

    specs: [ 'features/**/*.feature' ],

    serenity: {
        runner: 'cucumber',
        crew: [
            ConsoleReporter.forDarkTerminals(),
        ]
    },
    
    // other config
};

Using Serenity BDD reporter

To use the Serenity BDD reporter, install the following dependencies:

npm install --save-dev @serenity-js/{core,cucumber,web,protractor,serenity-bdd} npm-failsafe rimraf

Next, configure your protractor.conf.js as follows:

const
    { ArtifactArchiver } = require('@serenity-js/core'),
    { SerenityBDDReporter } = require('@serenity-js/serenity-bdd');

exports.config = {
    framework:      'custom',
    frameworkPath:  require.resolve('@serenity-js/protractor/adapter'),

    serenity: {
        runner: 'cucumber',
        crew: [
            ArtifactArchiver.storingArtifactsAt('./target/site/serenity'),
            new SerenityBDDReporter(),
        ]
    },

    // other config
};

To automatically download the Serenity BDD reporter CLI when you install your Node modules, add the following postinstall script to your package.json file:

{
  "scripts": {
    "postinstall": "serenity-bdd update",
  } 
}

To generate Serenity BDD reports when you run your tests, configure your test script to invoke serenity-bdd run when your tests are finished:

{
    "scripts": {
        "postinstall": "serenity-bdd update",
        "clean": "rimraf target",
        "test": "failsafe clean test:execute test:report",
        "test:execute": "protractor ./protractor.conf.js",
        "test:report": "serenity-bdd run --features ./features"
    }
}

Configuring Cucumber

All of the cucumberOpts will be passed to cucumberjs as arguments.

For example, to call Cucumber with the --strict flag and to specify custom formatters:

exports.config = {
    framework: 'custom',
    frameworkPath: require.resolve('@serenity-js/protractor/adapter'),

    specs: [
        'features/**/*.feature'
    ],
    
    cucumberOpts: {
        strict: true,
        format: [
            'progress', 
            'pretty:output.txt'
        ],
        // ...
    }
}

The following parameters have special behaviour:

  • require - globs will be expanded to multiple --require arguments
  • rerun - value is passed as an argument; for use with the rerun feature

Formatters when tests are sharded or with multi capabilities

If you have a formatter that outputs to a path and your tests are sharded or you have multi capabilities then this library will add the PID to the path to make them unique. The reason for this is multiple processes can write to the same path which ends up clobbering each other. You'll end up with 1 file per process that protractor spawns.

exports.config = {
    capabilities: {
        shardTestFiles: true,
        // ...
    },

    cucumberOpts: {
        format: 'json:results.json',
        // ...
    }
};

If there were 2 feature files then you can expect the following output files...

  results.11111.json
  results.22222.json

...where the numbers will be the actual PIDs.

Uncaught Exceptions

If your process abruptly stops with an exit code 199 then your steps most likely threw an uncaught exception. Protractor is capturing these and exiting the process in this situation. The solution is to upgrade to at least protractor version 7.0.0 and add the following to your protractor conf...

  ignoreUncaughtExceptions: true

This allows cucumber to handle the exception and record it appropriately.

Contributing

Pull requests are welcome. Commits should be generated using npm run commit command.

For Contributors

Ensure that the following dependencies are installed:

  • Java Runtime Environment (JRE) 8 or newer
  • Node.js LTS
  • Google Chrome

Clone the github repository:

git clone https://github.com/protractor-cucumber-framework/protractor-cucumber-framework
cd protractor-cucumber-framework
npm install

Testing

npm test

Your feedback matters!

Do you find Serenity/JS useful? Give it a โญ star on GitHub and rate it on Openbase!

GitHub stars Rate on Openbase

Found a bug? Need a feature? Raise an issue or submit a pull request.

Have feedback? Let me know on LinkedIn or leave a comment in Serenity/JS discussions on GitHub

If you'd like to chat with fellow users of Serenity/JS, join us on Serenity/JS Community Chat.

Support Serenity/JS

Serenity/JS is a free open-source framework, so we rely on our wonderful GitHub sponsors to keep the lights on.

If you appreciate all the effort that goes into making sophisticated tools easy to work with, please support our work and become a Serenity/JS GitHub Sponsor today!

GitHub Sponsors

protractor-cucumber-framework's People

Contributors

a-r-o-n avatar achuinard avatar alexandrosd avatar codyray avatar darlanalves avatar darrinholst avatar dependabot[bot] avatar flaviencathala avatar gitter-badger avatar jan-molak avatar kalmykov-sergey avatar loicmahieu avatar lucas-c avatar mattfritz avatar phenomnomnominal avatar sjelin avatar wswebcreation avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

protractor-cucumber-framework's Issues

Issue: Running multiple scenarios in 1 feature file (Application with SSO)

We are using the "protractor-cucumber-framework" for our test automation needs, we encountered an issue while running multiple scenarios in 1 feature file.

Description: The application under test is having a SSO login, when i run the scenarios using the feature tag / scenario tag, the window for the second scenario opens before the first scenario closes. We tried to close the Webdriver window using browser.close();, in that case the second scenario fails due to the reason "Unable to find session id"

Feature File:
@BookSearch
Feature: To search a book on the online store
As a user I want to search a book online so that I can select a book online

@authorname
Scenario: Search with Book Name
Given I am on the online search page to look up for a book based on author Name
When I click on search
Then the search results related to the book name should be displayed

@title
Scenario: Search with Title
Given I am on the online search page to look up for a book based on Title
When I click on the serach after entering the Title
Then the search results related to the book Title should be displayed

Config file:

exports.config = {

    framework: 'custom',

      frameworkPath: require.resolve('protractor-cucumber-framework'),
suites: {

    DemoSearch: 'test/features/BookSearch/bookSearch.feature'
},

cucumberOpts: {


  require:'test/TestScripts/BookSearch/*_Search.js',

 //   tags:'@authorName,@Title',


    format: 'summary',
    keepAlive: false
},

 capabilities: {
    browserName: 'internet explorer',
     version:'8',
    browserAttachTimeout:20000,
    enableElementCacheCleanup:true,
    javascriptEnabled:true,
    ignoreProtectedModeSettings:true,
    'ie.ensureCleanSession':false,
     shardTestFiles:true,
     maxInstances:2

},

resultJsonOutputFile: 'TestResult/report.json',

jasmineNodeOpts: {
    defaultTimeoutInterval: 20000
}

};

The step definitions are in 2 different .js files, we tried with all step definitions in 1 file, that doesn't work too. Let us know if there any solution that can be implemented or the Framework / tool needs a update?

Any help is highly appreciated!

protractor-cucumber HTML reporting feature request

I have been using the "resultJsonOutputFile" feature of protractor which generates an Json file which has to be converted to xml format which could be then displayed as HTML report. can we have protractor-cucumber to generate html reports or support at least cucumber-html-report plugin in cucumberOptions?? are there any PR's raised for this?
Note: I am aware that there is a work around by installing node-module called cucumber-html report which uses mustache to convert json files to html reports.

Support for cucumber 0.10.x

Hi,

i cannot update the cucumber dependendy of my project to 0.10.x, because the protractor-cucumber-framework peer-dependency is set to 0.9.x.

Hope this will be adressed soon.

require globs are not expanded

Looks like glob expansion that protractor did for us is missing for the require option. I did it manually in my conf file, but it would be nice if this could be brought back.

before:

    cucumberOpts: {
      format: ['json:build/test-results/protractor.json', 'pretty'],
      require: ['features/step_definitions/**/*.js', 'features/support/**/*.js']
    },

after:

    cucumberOpts: {
      format: ['json:build/test-results/protractor.json', 'pretty'],
      require: glob.sync('features/step_definitions/**/*.js').concat(glob.sync('features/support/**/*.js'))
    },

Report is not generated properly when SharedTestFiles:true

framework: 'custom',
frameworkPath: require.resolve('protractor-cucumber-framework'),
rootElement: 'body', // location of ng-app directive
//seleniumAddress: 'http://localhost:4444/wd/hub',
capabilities: {
browserName: 'chrome',
shardTestFiles: true,
maxInstances: 10,
cucumberOpts: {
format: 'json:./cukes-pro/reports/cucumber.chrome.json'
}
}

When I am doing the shared execution=true for parallel , then the report is not having the complete execution result.

Assertions [launcher] Process exited with error code 1

When I run tests assertion errors exit with code 1 rather than continue with step executions

AssertionError: expected 'X' to include 'Y'
[launcher] Process exited with error code 1

I'm also not getting any console report colours compared to execution directly via cucumberjs

My setup if fairly simple:

protractor.conf.js

exports.config = {
  seleniumAddress: 'http://localhost:4444/wd/hub',
  directConnect: true,
  specs: ['test/features/*.feature'],
  // set to "custom" instead of cucumber.
  framework: 'custom',

  // path relative to the current config file
  frameworkPath: './node_modules/protractor-cucumber-framework',

  // relevant cucumber command line options
  cucumberOpts: {
    require: 'test/features/*.js',
    format: "pretty"
  },
  onPrepare: function() {
    browser.ignoreSynchronization = true;
    browser.baseUrl = "http://localhost:3000";
  }
};

stepDefinitions

var chai = require('chai');
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);

var expect = chai.expect;

module.exports = function() {
    this.When(/^I sign in as "([^"]*)"$/, function (arg1, next) {
      browser.get("/");
      // Assertion error here will exit the process
      expect(browser.getTitle()).to.eventually.contain("X");
      element(by.css('[type="email"]')).sendKeys('[email protected]');
      element(by.css('[type="password"]')).sendKeys('password');
      element(by.css('[type="submit"]')).click();
      next();
    });
}

Thanks

"Reduce of empty array with no initial value" Error message when executing protractor

Hi again!

I'm trying to install protractor-cucumber-framework again, but when trying to execute a test, I'm getting the following error:

Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://10.152.250.231:56864/wd/hub
[launcher] Error: TypeError: Reduce of empty array with no initial value
    at Array.reduce (native)
    at /Users/maria/automation/automation/test/e2e/node_modules/protractor-cucumber-framework/index.js:36:12
    at Array.forEach (native)
    at Object.exports.run (/Users/maria/automation/automation/test/e2e/node_modules/protractor-cucumber-framework/index.js:26:45)
    at /Users/maria/automation/automation/test/e2e/node_modules/protractor/lib/runner.js:337:35
    at _fulfilled (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/q/q.js:797:54)
    at self.promiseDispatch.done (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/q/q.js:826:30)
    at Promise.promise.promiseDispatch (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/q/q.js:759:13)
    at /Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/q/q.js:525:49
    at flush (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/q/q.js:108:17)
[launcher] Process exited with error code 100

Anything I'm missing out during the install?
Thanks!

Cucumber report gets overwritten if tests are sharded

Hi,

I don't know if any of you encountered this or even if this is the right place to raise this, but when I run my tests and shard them using Protractor then Cucumber's JSON report (I set the output path in the config) gets overwritten every time one of the shards finishes running. Would it be possible to address this?

`undefined` can not be passed as `tags`

Use case:

cucumberOpts: {
  tags: process.env.TAG && process.env.TAG.split(',')
}

Results in --tags undefined and throws an error in cucumber.
It would be great if undefined are ignored.

Object Wrapper error inside support_code_loader.js:64:29

I used config file as

//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': 'firefox'
},

// 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
}
};

and Step defnition and feature files are also given below but while running getting above error. please let me know if you need any details

features/test.feature

Feature: Running Cucumber with Protractor
As a user of Protractor
I should be able to use Cucumber
In order to run my E2E tests

Scenario: Protractor and Cucumber Test
    Given I go to "https://angularjs.org/"
    When I add "Be Awesome" in the task field
    And I click the add button
    Then I should see my new task in the list

module.exports = function() {

this.Given(/^I go to ([^"]*)$/, function(site, callback) {
browser.get(site).then(callback);
});

Question (More So Than Issue)

Hi There,

Apologies for creating an issue but am not sure where is the best place to post this question. Perhaps here is not the best place but anyway I hope somebody can help with this.

I have downloaded your project "project-cucumber-framework" and ran as per instructions. It runs as expected which is great. Now I take a copy of the "package.json" file and move it to another project called "ProtractorSample" for example. The contents are listed below

{
"name": "Test123",
"version": "1.0.0",
"description": "Test,
"main": "index.js",
"scripts": {
"test": "echo "Error: no test specified" && exit 1"
},
"author": "Bhreinb",
"license": "MIT",
"dependencies": {
"debug": "^2.2.0",
"glob": "^7.0.3",
"object-assign": "^4.0.1",
"q": "^1.4.1"
},
"peerDependencies": {
"cucumber": ">= 0.9.1"
},
"devDependencies": {
"chai": "^3.4.1",
"chai-as-promised": "^5.2.0",
"cucumber": "^1.0.0",
"httpster": "^1.0.1",
"protractor": "^3.2.0",
"protractor-cucumber-framework": "^0.6.0"
}
}

and I run with the following config file.

exports.config =
{

framework: 'custom',

// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),

DirectConnect: true,

allScriptsTimeout: 20000,

// Capabilities to be passed to the webdriver instance.
capabilities: {

    browserName: 'chrome',

    pageLoadingStrategy: 'eager',

    ignoreProtectedModeSettings: true

},

// Spec patterns are relative to the location of the spec file. They may include glob patterns.
suites: {

    testpage: 'features/browse.feature'

    //search: ['tests/e2e/contact_search/**/*Spec.js', 'tests/e2e/venue_search/**/*Spec.js']

},

resultJsonOutputFile: 'testoutput.json',

cucumberOpts:
{

    require: 'features/step_definitions/*_steps.js',

    format: "pretty",

    profile: false,

    'no-source': true

},

onPrepare: function() 
{

    browser.manage().deleteAllCookies();

    //window.sessionStorage.clear();

    //window.localStorage.clear();

    browser.driver.manage().window().maximize();

    browser.ignoreSynchronization = false;

}

};

The test passes but for the life of me I can't figure why the test execution is different in that I get the following output

[21:56:56] I/local - Starting selenium standalone server...
[21:56:56] I/launcher - Running 1 instances of WebDriver
[21:56:56] I/local - Selenium standalone server started at http://192.168.0.22:33051/wd/hub
Feature: Visiting Angular's website

As a user
I should be able to enter my name in the textbox and the message should contain my name

cucumber event handlers attached via registerHandler are now passed the associated object instead of an event
getPayloadItem will be removed in the next major release
Scenario: User tries out search bar
๏ฟฝ[32mGiven I go to angular's website and I enter hello into the name box๏ฟฝ[39m
๏ฟฝ[32mThen the greeting should be Hello hello!๏ฟฝ[39m

Scenario: User tries out search bar
๏ฟฝ[32mGiven I go to angular's website and I enter bye into the name box๏ฟฝ[39m
๏ฟฝ[32mThen the greeting should be Hello bye!๏ฟฝ[39m

2 scenarios (๏ฟฝ[32m2 passed๏ฟฝ[39m)
4 steps (๏ฟฝ[32m4 passed๏ฟฝ[39m)
0m00.006s
[21:57:14] I/local - Shutting down selenium standalone server.
[21:57:14] I/launcher - 0 instance(s) of WebDriver still running
[21:57:14] I/launcher - chrome #1 passed

in that the test execution time is way off (4th last line). It should be 8 seconds or so. Any ideas what I'm doing wrong? Many thanks in advance as to any help regarding the above.

Btw the duration number wrote to the JSON file what is that measured in? I initially thought it to be unix time but it would appear not to be. Sorry for all the questions I'm a newbie per say.

Stack-chain error causes tests to suddenly timeout

Whenever I try to run any protractor-cucumber test after upgrading Protactor to the latest verion (3.0) and adding on the configuration file:
framework: 'custom',
frameworkPath: '../e2e/node_modules/protractor-cucumber-framework',

I'm getting the following error:

Scenario: Viewing library that contains magazines and books
Given I am logged in as "[email protected]"
Error: Step timed out after 5000 milliseconds
at Timer.listOnTimeout (timers.js:92:15)

Scenario: Clicking on magazine on library
Given I am logged in as "[email protected]"
TypeError: Cannot define property:callSite, object is not extensible.
at Function.defineProperty (native)

Stack trace follows:

/Users/maria/automation/automation/test/e2e/node_modules/cucumber/node_modules/stack-chain/stack-chain.js:195
Object.defineProperty(this, 'callSite', {
^
TypeError: Cannot define property:callSite, object is not extensible.
at Function.defineProperty (native)
at [object Object].Object.defineProperty.set (/Users/maria/automation/automation/test/e2e/node_modules/cucumber/node_modules/stack-chain/stack-chain.js:195:12)
at Function.prepareStackTrace (/Users/maria/automation/automation/test/e2e/node_modules/cucumber/node_modules/stack-chain/stack-chain.js:141:20)
at [object Object].promise.Promise.goog.defineClass.resolve_ (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1128:38)
at eval (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1059:14)
at [object Object].reject (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:1400:7)
at eval (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2708:36)
at Array.forEach (native)
at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.interrupts_.forEach as abort_
at [object Object].promise.ControlFlow.goog.defineClass.goog.defineClass.abort_.error.executeNext_.processUnhandledRejections_ (/Users/maria/automation/automation/test/e2e/node_modules/protractor/node_modules/selenium-webdriver/lib/goog/../webdriver/promise.js:2808:12)
[launcher] Process exited with error code 1

Seems like a potential problem with stack-chain, a dependency of cucumber. I actually found this bug report on their repo, which is still to be diagnosed.

Any idea what could be happening?

Thanks!

Report steps to protractor engine

Currently, only scenarios are reported to protractor engine via 'testPass' and 'testFail' events. It'd be nice to report steps to provide users with much more details.

This feature was originally requested in https://youtrack.jetbrains.com/issue/WEB-24165#comment=27-1736886.

I would expect to see the steps in the tree as well. I'm thinking a click would go to the step in the scenario, a shift+click or context menu would take you to the step code definition.

Getting warning 'getPayloadItem will be removed in the next major release'

The problem is that I see the every time that I run the test one warning in the terminal the warning is

cucumber event handlers attached via registerHandler are now passed the associated object instead of an event
getPayloadItem will be removed in the next major release

One example here

> [email protected] test-desktop-local /Users/adolfocabrera/xxx/QA-testing/Selenium/xxx
> protractor conf.js --seleniumAddress 'http://localhost:4444/wd/hub'
[10:09:17] I/hosted - Using the selenium server at http://localhost:4444/wd/hub
[10:09:17] I/launcher - Running 1 instances of WebDriver
Feature: xxx login
    As a user of xxx login
    I should be able to login in xxx using an existent user

cucumber event handlers attached via registerHandler are now passed the associated object instead of an event
getPayloadItem will be removed in the next major release
 @critical
  Scenario: Check xxx login
    Given The xxx login page is open
    Then The title should contain "xxx"
    And I should be able to login using a xxx user
    And Balance should be displayed
    And Games container should be displayed
    And I should be able to logout

1 scenarios (3 passed)
6 steps (6 passed)
0m43.082s
Report created successfully!
[10:11:23] I/launcher - 0 instance(s) of WebDriver still running
[10:11:23] I/launcher - chrome #01 passed

Should Show "specs" Config Variable in Documentation

I'm having a TON of trouble getting this framework to recognize my files. The README currently says to new users to set the framework config variable, and then tells them to go f! themselves. It's critical to mention that you mention that we need to also set the "specs" option in the protractor config file to look for ".feature" and ".step" files. It would also be nice to know how to actually implement the step definitions since every cucumber implementation is different.

Adding Jasmine?

Hi,

Normally Protractor works with jasmine, but I think changing the framework to this:

  framework: 'custom',
  frameworkPath: require.resolve('protractor-cucumber-framework'),

in protractor.conf.js removes Jasmine as I'm getting "expect is not a function" errors. Is it possible for me to add Jasmine to this setup and do assertions right in a step definition file without making any describes full of it's?

Unit Tests in Step Definitions?

Hi,

I know this project is PROTRACTOR cucumber framework, but I have a situation where I would like to sometimes do protractor "web tests" in my low level step definitions and sometimes implement the step definitions more like "unit tests".

According to this podcast it is an anti-pattern to have your step definitions be all only web tests:
https://cucumber.io/blog/2016/05/09/cucumber-antipatterns

Currently, I can call all regular protractor commands, and I'm using chai for assertions in the web tests.

Sometimes, however, I would like to use angular-mocks to just inject a controller or filter in a vacuum, without loading up the whole web page and going through the UI.

Is this possible? I tried it, but I'm getting, a "window is not defined" error from angular-mocks when I try to run it:

var chai = require('chai');
var expect = chai.expect;
var inject = require('angular-mocks').inject;
var chaiAsPromised = require('chai-as-promised');
chai.use(chaiAsPromised);

var myStepDefinitionsWrapper = function () {

  var myCtrl;

  this.Given(/^Some shiz$/, function (callback) {
    browser.get('/index.html');
    // module('ngNjOrg');

  inject(function ($controller, _mySvc_) {
      var scope = {};
      var mySvc = _mySvc_;
      myCtrl2 = $controller('RegisterController as ctrl', {
        $scope: scope
      });
    });

    callback();
  });

  this.When(/^I do shiz$/, function (callback) {

    // myCtrl.booyah();

    callback();
  });

  this.Then(/^shiz happens\.$/, function (callback) {
    callback();
  });



};
module.exports = myStepDefinitionsWrapper;

Thanks!

Running 'npm start' not working on Windows10 using gitbash

Just running npm start I get the following message:
Starting HTTPster v1.0.3 on port "'process.env.HTTP_PORT" from testapp/

It seems like this should default to the webServerDefaultPort in environment.js.

I can get the app running by changing the start script in package.json to
"start": "httpster -d testapp/ -p 8081",

TypeError: Cucumber.Cli is not a function

Hi Matt,

I am unable to resolve the below issue...
Please advise. Thanks

[10:54:43] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[10:54:43] I/launcher - Running 1 instances of WebDriver
[10:54:46] E/launcher - Error: TypeError: Cucumber.Cli is not a function
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor-cucumber-framework\ind
ex.js:31:16
at Function.promise (C:\Users\uru\AppData\Roaming\npm\node_modules\q\q.js:682:9)
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor-cucumber-framework\ind
ex.js:24:14
at _fulfilled (C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_modul
es\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\uru\AppData\Roaming\npm\node_modules\protra
ctor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\uru\AppData\Roaming\npm\node_modules
protractor\node_modules\q\q.js:796:13)
at C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:55
6:49
at runSingle (C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_module
s\q\q.js:137:13)
at flush (C:\Users\uru\AppData\Roaming\npm\node_modules\protractor\node_modules\q
q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
[10:54:46] E/launcher - Process exited with error code 100

Below is conf.js file i am using...

//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('C:/Users/uru/AppData/Roaming/npm/node_modules/protractor-cucumber-framework'),
frameworkPath: 'C:/Users/uru/AppData/Roaming/npm/node_modules/protractor-cucumber-framework',
capabilities: {
'browserName': 'chrome'
},

// Spec patterns are relative to this directory.
specs: [
'D:/tractor/features/*.feature'
],

baseURL: 'https://angularjs.org/',

cucumberOpts: {
require: 'D:/tractor/features/step_definitions/my_step_definitions.js',
tags: false,
format: 'pretty',
profile: false,
'no-source': true
}
};

Can't Use Protractor API?

Hi, I'm VERY confused about the proper way to use this.

I thought that the whole point of using cucumber with protractor was that you can use the protractor api in the step definition methods. However, when I put things like element(by.css(.something)) it gives me errors, "element is not a function".

All of the Protractor methods cause the test runner to crash. How can I use the Protractor api in the step definition methods? Thanks.

Timeouts Not Working with Protractor Cucumber Framework

I am utilizing a cucumber / protractor combination and I can't seem to increase the timeout for steps to run more than the 5000 milisecond limit.

Here is an example of what I am running:

https://gist.github.com/stevenmccord/0997c2c5760540d4709b

Also, here are the versions of everything that I am running:

cucumberjs --version
0.9.2

protractor --version
Version 3.0.0

I have been chatting on the Glitter channel as well, but it doesn't appear anything has been able to be resolved, and the recommendation was to open an issue to see if there is a bug, or maybe there is a workaround.

Thanks!

Exclude particular step definition from CucumberOpts

currently i have setup my tests with protractor and cucumber and i have the following cucumberOpts -

cucumberOpts: {

        monochrome: true
        , strict: true
        , plugin: ["pretty"]
        , require: ['../StepDefinitions/*.js', '../Support/*.js']
        , tags: '@AllureScenario,@Regression,@ProtractorScenario,~@DatabaseTest' 
    }

I have to exclude a particular step definition from require key, is there a way for it, i have searched various forums - SO, gitter but no help, if its a new feature request please consider it.

Getting error in Windows

While running 'npm test', I am getting error.

running: node_modules/protractor/bin/protractor spec/cucumberConf.js

fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberO
pts.tags @failing
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberO
pts.tags @failing --cucumberOpts.fail-fast
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberO
pts.tags @strict --cucumberOpts.strict
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberO
pts.tags @strict
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/multiConf.js --cucumberOpts
.tags @failing
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
Summary: fail
npm ERR! Test failed. See above for more details.
npm WARN Local package.json exists, but node_modules missing, did you mean to in
stall?

Protractor error 105 when trying to run conf.js using Eclipse IDE.

Hi,
I'm new to protractor, i'm trying to run the protractor scripts through Eclipse IDE. I'm seeing the same issue.

[11:20:09] E/configParser - [SyntaxError: Unexpected token class]
[11:20:09] E/configParser - Error code: 105
[11:20:09] E/configParser - Error message: failed loading configuration file E:\Protractor\Sample-Protractor\conf.js
[11:20:09] E/configParser - SyntaxError: Unexpected token class
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:414:25)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at ConfigParser.addFileConfig (E:\Protractor\Sample-Protractor\node_modules\protractor\built\configParser.js:128:26)
at Object.initFn [as init] (E:\Protractor\Sample-Protractor\node_modules\protractor\built\launcher.js:97:22)
at Object. (E:\Protractor\Sample-Protractor\node_modules\protractor\built\cli.js:112:10)

Below is my conf.js and to-do.js file :

conf.js class
exports.config = {
//seleniumAddress: 'http://localhost:4444/wd/hub',
directConnect: true,
specs: ['to-do.js']
};

describe('angularjs homepage todo list', function() {
it('should add a todo', function() {
browser.get('https://angularjs.org');

element(by.model('todoList.todoText')).sendKeys('write first protractor test');
element(by.css('[value="add"]')).click();

var todoList = element.all(by.repeater('todo in todoList.todos'));
expect(todoList.count()).toEqual(3);
expect(todoList.get(2).getText()).toEqual('write first protractor test');

// You wrote your first test, cross it off the list
todoList.get(2).element(by.css('input')).click();
var completedAmount = element.all(by.css('.done-true'));
expect(completedAmount.count()).toEqual(2);
});
});

Running 'npm test' not working on Windows10 using gitbash

When running npm test I get the following output.

`

[email protected] test .\protractor-cucumber-framework
node test.js

running: node_modules/protractor/bin/protractor spec/cucumberConf.js

fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberOpts.tags @failing
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberOpts.tags @failing --cucumberOp ts.fail-fast
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberOpts.tags @strict --cucumberOpt s.strict
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/cucumberConf.js --cucumberOpts.tags @strict
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
running: node_modules/protractor/bin/protractor spec/multiConf.js --cucumberOpts.tags @failing
fail: Error: spawn node_modules/protractor/bin/protractor ENOENT
Summary: fail
npm ERR! Test failed. See above for more details.
`

I can get all tests to pass by running protractor spec/cucumberConf.js and then protractor spec/multiConf.js

Failed to load with frameworkPath

Hi,

I'm trying to use cucumber with basic tests found in cucumberjs readme.

cucumberjs --version
0.9.2

protractor --version
Version 3.0.0
/* protractor.conf.js */
exports.config = {
    rootElement: '[ng-app]',

    seleniumServerJar: 'node_modules/selenium-server/lib/runner/selenium-server-standalone-2.48.2.jar',

    specs: [
        'tests/e2e/myfeature.feature'
    ],

    getPageTimeout: 100000,

    onPrepare: function() {
        global.__base = __dirname + '/';
    },

    capabilities: {
        browserName: 'chrome',
        version: '',
        platform: 'ANY',
        idleTimeout: 90
    },

    framework: 'custom',
    frameworkPath: require.resolve('protractor-cucumber-framework'),

    cucumberOpts: {
        require: [
            'tests/e2e/steps/mystep.js',
        ],
        format: 'pretty', // or summary
        keepAlive: false
    },

    onCleanUp: function() {}

};

myfeature.feature:

Feature: Example feature
    As a user of cucumber.js
    I want to have documentation on cucumber
    So that I can concentrate on building awesome applications

    Scenario: Reading documentation
        Given I am on the Cucumber.js GitHub repository
        When I go to the README file
        Then I should see "Usage" as the page title

mystep.js:

module.exports = function () {
    this.World = require(__base +'tests/e2e/support/world').World;

    this.Given(/^I am on the Cucumber.js GitHub repository$/, function (callback) {
        // Express the regexp above with the code you wish you had.
        // `this` is set to a World instance.
        // i.e. you may use this.browser to execute the step:

        console.log(this);

        this.visit('https://github.com/cucumber/cucumber-js', callback);

        // The callback is passed to visit() so that when the job's finished, the next step can
        // be executed by Cucumber.
    });

    this.When(/^I go to the README file$/, function (callback) {
        // Express the regexp above with the code you wish you had. Call callback() at the end
        // of the step, or callback.pending() if the step is not yet implemented:

        callback.pending();
    });

    this.Then(/^I should see "(.*)" as the page title$/, function (title, callback) {
        // matching groups are passed as parameters to the step definition

        var pageTitle = this.browser.text('title');
        if (title === pageTitle) {
            callback();
        } else {
            callback(new Error("Expected to be on page with title " + title));
        }
    });
};
protractor protractor.conf.js --baseUrl="my-url-website"

Here is my output:

Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://192.168.168.82:55494/wd/hub
[launcher] Error: TypeError: Path must be a string. Received false
    at assertPath (path.js:8:11)
    at Object.posix.resolve (path.js:424:5)
    at Object.realpathSync (fs.js:1380:18)
    at Object.expandPathWithRegexp (/Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/path_expander.js:23:23)
    at /Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/path_expander.js:9:39
    at Array.forEach (native)
    at Object.expandPathsWithRegexp (/Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/path_expander.js:8:11)
    at Object.expandPaths (/Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/feature_path_expander.js:6:38)
    at getFeaturePaths (/Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/configuration.js:34:45)
    at Object.getFeatureSources (/Users/syl/Sites/pro/back-office-edito-web/node_modules/cucumber/lib/cucumber/cli/configuration.js:110:26)
[launcher] Process exited with error code 100

I commented the feature file but nothing. Have you an idea?

Bests :)

Angular 2 "Failed Loading Configuration File" Error

Hi, I was able to get this working for AngularJS projects, but I'm getting a strange error when trying to use it with Angular 2. Here's my protractor.conf.js:

This is the error that is displayed:

[10:40:47] E/configParser - error code: 105
[10:40:47] E/configParser - description: failed loading configuration file config/acceptance-protractor.conf.js

/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/configParser.js:130
            throw new exitCodes_1.ConfigError(logger, 'failed loading configuration file ' + filename);
            ^
Error
    at ConfigError.ProtractorError (/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/exitCodes.js:10:22)
    at new ConfigError (/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/exitCodes.js:26:16)
    at ConfigParser.addFileConfig (/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/configParser.js:130:19)
    at Object.initFn [as init] (/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/launcher.js:94:22)
    at Object.<anonymous> (/Users/jim/Git-Projects/Angular-2-Screencast-Example/node_modules/protractor/built/cli.js:130:10)
    at Module._compile (module.js:413:34)
    at Object.Module._extensions..js (module.js:422:10)
    at Module.load (module.js:357:32)
    at Function.Module._load (module.js:314:12)
    at Module.require (module.js:367:17)

angular-2-screencast-example_ -bash 153x21_and_angular-2-screencast-example-___git-projects_angular-2-screencast-example__and_footer_step_js-ng-nj_org-___git-projects_ng-nj_org

Here's my protractor.conf file:

// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/docs/referenceConf.js

/*global jasmine */
// var SpecReporter = require('jasmine-spec-reporter');

exports.config = {
allScriptsTimeout: 11000,
specs: [

'../src//*.feature',
'../src/
/*.step.js

],
capabilities: {
'browserName': 'chrome'
},
directConnect: true,
baseUrl: 'http://localhost:4200/',
framework: 'custom',

// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
print: function() {}
},
useAllAngular2AppRoots: true,
beforeLaunch: function() {
require('ts-node').register({
project: 'e2e'
});
},
onPrepare: function() {
// jasmine.getEnv().addReporter(new SpecReporter());
}
};

And I'm runnign it with this command:

./node_modules/protractor/bin/protractor config/acceptance-protractor.conf.js 

CreateProcess error=193, %1 is not a valid Win32 application

Hi
I am experiencing the following error when run the test.. not sure where it went wrong please guide if anyone has experienced this issue before.

Error running lib.feature:
Cannot run program "C:\Users\ranjith.donthi\protractor-cucumber-framework\node_modules\cucumber\bin\cucumber.js" (in directory "C:\Users\ranjith.donthi\protractor-cucumber-framework\spec"): CreateProcess error=193, %1 is not a valid Win32 application

cucumberOpts ES6 compiler

Seems that cucumber compiler does not work with es6 and babel-core/register

// protractor.conf.js
...
framework: "custom",

frameworkPath: require.resolve("protractor-cucumber-framework"),

cucumberOpts: {
    compiler: "es6:babel-core/register",
    require: "features/step_definitions/**/*.es6"
}
...

Error occured:
Error: SyntaxError: Unexpected token import

Any ideas?
Tried with

"babel-core": "6.3.21",
"cucumber": "0.9.2",    
"protractor": "3.0.0",
"protractor-cucumber-framework": "0.3.2"

Supporting multicapabilities with consolidated cucumber JSON

Currently there is no consolidated JSON available if we have multicapabilities. There is 1 current pull request pending to generate the individual json files.
578a466

If we can have a consolidated JSON file, it would be easy to generate overall test execution report otherwise we need to keep having individual files.

runState in resultsCapturer not initialised on Windows 10

I'm using protractor-cucumber-framework and grunt-protractor-runner to run BDD tests from a grunt task and I'm getting the following error on Windows 10 only (the same set up runs on OSX).

node_modules\protractor-cucumberframework\lib\resultsCapturer.js:22
state.results.failedCount = 0;
TypeError: node_modules\protractor-cucumber-framework\lib\resultsCapturer.js:31 Cannot set property 'failedCount' of undefined

Initial investigation suggests that the instance of runState that is given to, and initialised in, index.js is not the same one given to resultsCapturer.js and hence the latter is uninitialised. E.g. if I add console.log('state exists: ' + Math.random()); to runState.js I see this log twice on Windows, each with a different random number, but only once on OSX.

Environment:
Windows 10 Pro - Insider Preview - Version 1607 - Build 14390
NodeJS v6.1.0
grunt-protractor-runner v3.2.0
protractor-cucumber-framework v0.6.0
The protractor config is quite long. I can provide if needed but the it begins with:
{ directConnect: true, framework: 'custom', frameworkPath: 'node_modules/protractor-cucumber-framework',

Before hooks are not working as expected

I am using cucumber 0.10.2, "gulp-protractor-cucumber-html-report": "0.0.9"
And i have
module.exports = function beforeHooks() {
this.Before('@Splan', function () {
var world = this;
splan.maximizeBrowser();
// Load the homepage.
splan.get();
// Clear localStorage.
world.clearLocalStorage();

    // Reload the page with empty localStorage.
    splan.get();
    //console.log("Before service Planning");
    browser.wait(function () {
        return browser.executeScript('return !!window.angular');
    }, 5000); // 5000 is the timeout in millis

    //done();
});

this.Before('@cped', function () {
    //code/...

var world = this;
cped.maximizeBrowser();
// Load the homepage.
cped.get();
// Clear localStorage.
world.clearLocalStorage();

    // Reload the page with empty localStorage.
    cped.get();
    //console.log("Before service Planning");
    browser.wait(function () {
        return browser.executeScript('return !!window.angular');
    }, 5000); // 5000 is the timeout in millis

    //done();

});

};

While I am executing @Splan test cases, it is executing both @Splan and @cped hooks.
And when I downgraded the cucumber to 0.9.2 version it worked well..

And when I am using the callback done the browser is hanging on url :data:text/html,,If I am removing callback done, then its working fine.

Running multiple scenarios in 1 feature file

I am using protractor-cucumber-framework version 0.6.0. I am having the same problem with multiple scenarios.

#26

Is this issue fixed?

Also having sleep in protractor page object model. Cucumber test fail with a time out. Without the sleep the test are passing. Is this related ?

Scenario Outlines being Ignored

Hi,

When attempting to run the step definitions on a cucumber scenario with the following structure:

Scenario Outline: Example
Given I have a table
When the table has been populated
Then the <Type> has Built <B>
Then the <Type> has Sold <S>
Then the <Type> has Destroyed <D>

| Type | B | S| D |
| Car | 456 | 357 | 666 |
| Boat | 456 | 357 | 666 |
| Train |  456 | 357 | 666 |
| Plane |  456 | 357 | 666 |

The scenario is completely ignored by protractor. I was wondering if Scenario Outlines were supported by this framework, and if not, is there plans for them to be supported?

Thanks!

Add support for cucumberjs v1.1.0 registerHandler api

cucumber/cucumber-js@7d7ba96
has changed the way registerHandler is implemented by deprecating getPayloadItem

see https://github.com/cucumber/cucumber-js/blob/7d7ba96262031b4fb7ab83216f474817d3892f3f/lib/cucumber/runtime/event.js#L14

EDIT: Actually the break is from the use of of callback and returning a promise.
But since that was the error displayed I assumed it was the cause
(Currently it breaks when used with cucumberjs 1.1.0 and protractor 2.3.0)

CLI parser doesn't handle empty arrays properly for flags without arguments

For example, when configuring protractor using a protractor.conf:

cucumberOpts.tags = []

The CLI parser will add --tags to the arguments, but does not pass the empty array. This is probably the case for any CLI flags that have extra arguments, such as require, specs, etc. It should either omit the flag and log a warning, or fail with a more useful message instead of the below.

[launcher] Error: Error: ENOENT: no such file or directory, lstat '/Users/$USER/src/app/pretty'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.