This package has been deprecated

Author message:

This package is protractor augmentation for old webdriver v3 classes. Currently (2019 Oct.) there is webdriver v5 available and this package is not tesed with latest webdriver. ls However you can find a lot of useful code here - feel free to reuse it (source on github)

protractor-extra

0.0.32 • Public • Published

Experimental

Do not use until verion 1.x.x released

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

Package Sidebar

Install

npm i protractor-extra

Weekly Downloads

0

Version

0.0.32

License

MIT

Unpacked Size

350 kB

Total Files

21

Last publish

Collaborators

  • fider