https://github.com/elaichenkov/wait-for-conditions
Node.js library for protractor tests that extends protractor's ExpectedConditions class with useful methods.
https://github.com/elaichenkov/wait-for-conditions
protractor webdriver
Last synced: 9 months ago
JSON representation
Node.js library for protractor tests that extends protractor's ExpectedConditions class with useful methods.
- Host: GitHub
- URL: https://github.com/elaichenkov/wait-for-conditions
- Owner: elaichenkov
- License: mit
- Archived: true
- Created: 2020-08-03T13:14:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-27T08:20:03.000Z (about 4 years ago)
- Last Synced: 2024-12-16T08:41:09.321Z (over 1 year ago)
- Topics: protractor, webdriver
- Language: TypeScript
- Homepage:
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wait-for-conditions
> wait-for-conditions is a library for [Protractor](https://github.com/angular/protractor) tests that extends protractor's ExpectedConditions class with useful methods.
## Table of Contents
- [wait-for-conditions](#wait-for-conditions)
- [Table of Contents](#table-of-contents)
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Import and usage](#import-and-usage)
- [License](#license)
## Getting Started
### Installation
To use wait-for-conditions in your project, run:
```bash
npm i -D wait-for-conditions
```
### Import and usage
```ts
// 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](./LICENSE).