Getting HTTP headers of the url
page response directly in a Nightwatch test
#4250
Labels
url
page response directly in a Nightwatch test
#4250
Description
Pretty often we need to check not only the HTML content on the page of the response, but also HTTP headers of the response.
For example, some websites provide caching information about the page (cache hit or miss, cache tags), some additional technical information like a number of SQL queries, internal calls to 3rd-party services, etc. Or simply just get the HTTP response code (200, 304, 404, etc).
Now it is possible using the
.network.captureRequests()
, but it's quite hard to find the original request among others.Another way is to use API Testing but it will require making another request, in addition to the current, if we have to check also HTML elements there, together with headers.
So, would be great to have the built-in functionality to get the headers directly from the response!
Suggested solution
Would be good to have something like this:
Alternatives / Workarounds
If this is already possible using the current API, please share how to do this.
Additional Information
No response
The text was updated successfully, but these errors were encountered: