Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement page.on('requestfinished') #4300

Open
ankur22 opened this issue Jan 30, 2025 · 0 comments
Open

Implement page.on('requestfinished') #4300

ankur22 opened this issue Jan 30, 2025 · 0 comments

Comments

@ankur22
Copy link
Contributor

ankur22 commented Jan 30, 2025

Feature Description

page.on('requestfinished') should be called when the request is successfully sent and a response from the website under test (WuT) is received. The response can be errors such as 404/500 etc.

When implementing page.on('request') and page.on('response') it became apparent that some of the methods on the request and response objects didn't behave the same as in Playwright. However, to overcome the shortfalls (1, 2) in page.on('request') a user should work with page.on('response') and to overcome the shortfall in that, we should implement both page.on('requestfailed') and page.on('requestfinished').

Suggested Solution (optional)

The implementation should be fairly trivial and these two PRs should help with the implementation:

  1. Add page.on('request') #4290
  2. Add page.on('response') #4296

The call to the handle should be done from onLoadingFinished.

Already existing or connected issues / PRs (optional)

Connected to: #4234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants