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
page.on('requestfailed') should be called when the request fails to be sent to the website under test (WuT). So not when k6 browser receives 404/500 back from the server (which is regarded as a success and will be directed to page.on('requestfinished')).
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:
Feature Description
page.on('requestfailed')
should be called when the request fails to be sent to the website under test (WuT). So not when k6 browser receives 404/500 back from the server (which is regarded as a success and will be directed topage.on('requestfinished')
).When implementing
page.on('request')
andpage.on('response')
it became apparent that some of the methods on therequest
andresponse
objects didn't behave the same as in Playwright. However, to overcome the shortfalls (1, 2) inpage.on('request')
a user should work withpage.on('response')
and to overcome the shortfall in that, we should implement bothpage.on('requestfailed')
andpage.on('requestfinished')
.Suggested Solution (optional)
The implementation should be fairly trivial and these two PRs should help with the implementation:
page.on('request')
#4290page.on('response')
#4296The call to the handle should be done from onLoadingFailed.
Already existing or connected issues / PRs (optional)
Connected to: #4234
The text was updated successfully, but these errors were encountered: