-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Getting HTTP headers of the url
page response directly in a Nightwatch test
#4250
Comments
I will love to work on it !! |
@MurzNN Will we be using |
Getting HTTP headers of the url page response directly in a Nightwatch test nightwatchjs#4250 github- Harshit-7373
Using So, if the Browser API doesn't provide any way to get the HTTP headers directly, seems the only way is to use |
I already implemented a custom Nightwatch command that does this using I created a draft PR with my implementation of this feature #4337 - please review it and your feedback about the idea and the implementation. |
yeahh okaayy ! |
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: