Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/dword-design/puppeteer-wait-for-transition
- Owner: dword-design
- License: other
- Created: 2023-06-04T15:21:17.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-08T07:06:51.000Z (2 months ago)
- Last Synced: 2024-10-17T19:23:46.832Z (about 1 month ago)
- Topics: animation, handle
- Language: JavaScript
- Homepage:
- Size: 734 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# puppeteer-wait-for-transition
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:
If you want to send me a one time donation. The coffee is pretty good 😊.
Also for one time donations if you like PayPal.
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)