wait-for-conditions
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

wait-for-conditions

wait-for-conditions wait-wor-conditions is a library for Protractor tests that extends protractor's ExpectedConditions class with useful methods.

Table of Contents

Getting Started

Installation

To use wait-for-conditions in your project, run:

npm i -D wait-for-conditions

Import and usage

// importing protractor's browser and $$
import { browser, $$ } from 'protractor';
 
// Import wait for conditions class
import { WaitForConditions } from 'wait-for-conditions';
 
// Create an instance of WaitForConditions class
const waitFor = new WaitForConditions(browser);
 
describe('Test suite', () => {
  it('should wait for the tds', async () => {
 
    // Usage:
    await browser.wait(waitFor.numberOfElementsToBe($$('td'), 4), 5000, 'Failed after waiting for the number of tds');
  });
});

License

wait-for-conditions is MIT licensed.

Package Sidebar

Install

npm i wait-for-conditions

Weekly Downloads

1

Version

1.0.1

License

MIT

Unpacked Size

9.15 kB

Total Files

5

Last publish

Collaborators

  • elaichenkov