New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

protractor-cucumber-boilerplate

Package Overview
Dependencies
Maintainers
3
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-cucumber-boilerplate

* `gulp test --env dev --tags "@debug"`

  • 0.12.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

How to run

  • gulp test --env dev --tags "@debug"

Page Objects

##Page Map

const AbstractPageMap = require("protractor-boilerplate").AbstractPageMap;
const LoginPage = require("./page/LoginPage");

class PageMap extends AbstractPageMap {

    constructor() {
        super();

        this.definePage("Login", "^.+))$", LoginPage);

    }

}

###Methods

  • definePage
parammandatorydescription
aliasMalias of the page
regexpMregexp of URL to determine page
clazzMpage class

##Page

const Page = require("protractor-boilerplate").AbstractPage;
const CustomComponent = require("./CustomComponent");

class CustomPage extends Page {

    constructor() {
        super();

        this.defineComponent("Custom Component", new CustomComponent());
        this.defineElement("Custom Element", "h3");
        this.defineCollection("Custom Collection", "h3.button");
    }

}

###Methods

  • defineComponent
parammandatorydescription
aliasMalias of the component
componentMcomponent object
  • defineElement
parammandatorydescription
aliasMalias of the component
selectorMcss selector of element
  • defineCollection
parammandatorydescription
aliasMalias of the component
selectorMcss selector of element

##Component

const Component = require("protractor-boilerplate").Component;

class CustomComponent extends Component {

    constructor(alias = "Dashboard", selector = ".div", isCollection = false) {
        super(alias, selector, isCollection);

        this.defineComponent("Custom Component", new CustomComponent());
        this.defineElement("Custom Element", "h3");
        this.defineCollection("Custom Collection", "h3.button");
    }

}

###Methods

  • constructor
parammandatorydescription
aliasMalias of the component
selectorMcss selector of element
isCollectionMisCollection flag
  • defineComponent
parammandatorydescription
aliasMalias of the component
componentMcomponent object
  • defineElement
parammandatorydescription
aliasMalias of the component
selectorMcss selector of element
  • defineCollection
parammandatorydescription
aliasMalias of the component
selectorMcss selector of element

Memory

##Memory

const Memory = require("protractor-boilerplate").Memory;

defineSupportCode(({setDefaultTimeout, When}) => {

    When(/^I remember "(.+)" value as "(.+)"$/, (alias, key) => {
        const page = State.getPage();

        return page.getElement(alias).getText()
            .then((text) => {
                Memory.setValue(key, text);
            })
    });
}

###Methods

  • setValue
parammandatorydescription
keyMkey of stored item
valueMvalue of stored item
  • parseValue returns value by provided key, otherwise returns key
parammandatorydescription
valueMa key or simple value

FAQs

Package last updated on 23 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc