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('response') #1153

Open
Tracked by #1460
ankur22 opened this issue Jan 11, 2024 · 0 comments
Open
Tracked by #1460

Implement page.on('response') #1153

ankur22 opened this issue Jan 11, 2024 · 0 comments
Labels
feature A new feature playwright Issue relating to Playwright compatibility user request Requested by the community

Comments

@ankur22
Copy link
Collaborator

ankur22 commented Jan 11, 2024

Feature Description

When the browser module navigates to a website, the browser (Chrome etc.) will perform further requests to retrieve dependencies such as js files, images, css files and so on. With page.goto, the response that is returned to the caller is for the initial navigation to the the website. This response object doesn't contain any response details for the dependency requests that are made after the initial navigation.

A response of the dependencies is useful so that fine grained checks can be made:

  1. Ensure that certain important dependencies are retrieved;
  2. Ensure that certain dependencies aren't retrieved;
  3. Ensure that the status code match the expected value;
  4. Assert certain details within the payload body;
  5. Dynamically assert on several dependencies depending on what has already been retrieved.
  6. etc.

Thresholds can be used for this too, but having something inline with the code feels like it could be beneficial since programmatic actions can be taken when dependency responses are retrieved or aren't retrieved.

Suggested Solution (optional)

Already existing or connected issues / PRs (optional)

#1227

@ankur22 ankur22 added feature A new feature user request Requested by the community labels Jan 11, 2024
@ankur22 ankur22 added the playwright Issue relating to Playwright compatibility label Feb 29, 2024
@ankur22 ankur22 added the next Might be eligible for the next planning (not guaranteed!) label Mar 4, 2024
@inancgumus inancgumus removed the next Might be eligible for the next planning (not guaranteed!) label Jun 20, 2024
@inancgumus inancgumus mentioned this issue Oct 4, 2024
@andrewslotin andrewslotin changed the title Implement page.on('response') Implement page.on('response') Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature playwright Issue relating to Playwright compatibility user request Requested by the community
Projects
Development

No branches or pull requests

2 participants