Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dword-design/puppeteer-wait-for-transition

Waits until a transition has finished for a Puppeteer element.
https://github.com/dword-design/puppeteer-wait-for-transition

animation handle

Last synced: 24 days ago
JSON representation

Waits until a transition has finished for a Puppeteer element.

Awesome Lists containing this project

README

        

# puppeteer-wait-for-transition



npm version
Linux macOS Windows compatible
Build status

Coverage status

Dependency status
Renovate enabled

Open in Gitpod

Buy Me a Coffee

PayPal

Patreon

Waits until a transition has finished for a Puppeteer element.

## Usage

```js
import puppeteer from 'puppeteer'
import waitTransition from 'puppeteer-wait-transition'

const browser = await puppeteer.launch()
const page = await browser.newPage()

// ...

const button = await modal.$('.open-button')
await button.click()

const modal = await page.waitForSelector('.modal')

// Wait for the fade in transition to end
await waitTransition(modal)

// E.g. take a screenshot of the modal

expect(await page.screenshot()).toMatchImageSnapshot
```

## Install

```bash
# npm
$ npm install puppeteer-wait-for-transition

# Yarn
$ yarn add puppeteer-wait-for-transition
```

## Contribute

Are you missing something or want to contribute? Feel free to file an [issue](https://github.com/dword-design/puppeteer-wait-for-transition/issues) or a [pull request](https://github.com/dword-design/puppeteer-wait-for-transition/pulls)! ⚙️

## Support

Hey, I am Sebastian Landwehr, a freelance web developer, and I love developing web apps and open source packages. If you want to support me so that I can keep packages up to date and build more helpful tools, you can donate here:



Buy Me a Coffee
 If you want to send me a one time donation. The coffee is pretty good 😊.


PayPal
 Also for one time donations if you like PayPal.


Patreon
 Here you can support me regularly, which is great so I can steadily work on projects.

Thanks a lot for your support! ❤️

## License

[MIT License](https://opensource.org/licenses/MIT) © [Sebastian Landwehr](https://sebastianlandwehr.com)