You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to implement page.on('request'). More details of the API can be found here. The request object that is returned to the handler is detailed here. This is a read only API, and no modifications can be done on the request object. k6 browser should not wait for a response from the handler, it fire and forgets.
Why
Users have asked to be able to read the requests that are being sent out from chromium to the website under test. This can be helpful in validating/asserting certain aspects of the request which could be important for the test to be deemed successful.
Comments
While testing the Playwright implementation i noticed that some of the methods on the request object are async. An example of this is data.response():
What's interesting about this is that the call to data.response() will in fact wait until a response is received. The current implementation of response on the request object does not fulfil this behaviour and we will need to change that too.
Async methods on request that will need to be checked to see if they behave the same as in PW:
Feature Description
What
We want to implement
page.on('request')
. More details of the API can be found here. The request object that is returned to the handler is detailed here. This is a read only API, and no modifications can be done on the request object. k6 browser should not wait for a response from the handler, it fire and forgets.Why
Users have asked to be able to read the requests that are being sent out from chromium to the website under test. This can be helpful in validating/asserting certain aspects of the request which could be important for the test to be deemed successful.
Comments
While testing the Playwright implementation i noticed that some of the methods on the request object are async. An example of this is
data.response()
:What's interesting about this is that the call to
data.response()
will in fact wait until a response is received. The current implementation of response on the request object does not fulfil this behaviour and we will need to change that too.Async methods on request that will need to be checked to see if they behave the same as in PW:
Suggested Solution (optional)
No response
Already existing or connected issues / PRs (optional)
No response
The text was updated successfully, but these errors were encountered: