You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

protractor-extra

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-extra

Agumentations for objects exported from protractor (TypeScript v.3+ only)

0.0.32
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

Experimental

Do not use until verion 1.x.x released

  • About
  • Installation & requirements
  • Examples
  • Documentation

About

Helpers for protractor and augmentations for protractor ElementFinder. Work in progress so not yet documented well.

Installation and requirements

Requires Node.js >= v6 Requires TypeScript >= v3 Requires TypeScript >= v5 (tested only with v5.4.2)

$ npm i -S protractor-extra

Examples

Classic protractor

  import { element, by, ExpectedConditions, browser } from "protractor";

  const userBtn = element( by.css('#user-btn') );

  async function doSomething() {
    let timeoutMs = config.clickbaleTimeout;
    let failMessage = `Element  "${userBtn.locator()}"  not clickable in ${timeoutMs/1000}s.`;
    await browser.wait(ExpectedConditions.elementToBeClickable(userBtn), timeoutMs, failMessage);
    await userBtn.click();
  }

With protractor-extra

  const { elementByCss } = require("protractor-extra"); // to guarantee sync import
  import { element, by } from "protractor";

  // `default` or any other milliseconds number value may be used
  const userBtn = elementByCss( '#user-btn',  {waitClickableBeforeClick: 'default'}  );

  async function doSomething() {
    await userBtn.click();
  }

Documentation

TODO when v 1.0.0 released

module

  • Class description

    • Class:method description

  • Function description

Keywords

protractor

FAQs

Package last updated on 08 Aug 2019

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.