0.0.32 • Published 5 years ago

protractor-extra v0.0.32

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

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

0.0.32

5 years ago

0.0.31

5 years ago

0.0.30

5 years ago

0.0.29

5 years ago

0.0.28

5 years ago

0.0.27

5 years ago

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago