headless-recorder
headless-recorder copied to clipboard
Add options to wait for network after a click
Description
With a React application, a click doesn't always change the navigation. But in most cases will load some extra data. So add an option to wait after all network activity is done when clicking.
Type of change
Please delete options that are not relevant.
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Internal testing
Checklist:
- [x] My code follows the style guidelines of this project.
npm run lintpasses with no errors. - [x] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my feature works
- [x] New and existing unit tests pass locally with my changes.
npm run testpasses with no errors.
@dolfje is this something that will work the same way in playwright? If not, we need to consider it only as a valid option for puppeteer.
@dolfje reminder 👆
I don't know playwright, but can't find it in their docs. So probably not.
Hi all, in playwright we can use await page.waitForLoadState('networkidle') instead :)
Maybe this can be a reference (self-test only, not ready for merge): https://github.com/RexSkz/headless-recorder/pull/4/files
https://github.com/checkly/headless-recorder/issues/232