-
Notifications
You must be signed in to change notification settings - Fork 844
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
Get HTTP status code from the response #470
Comments
Hi, HTTP status codes are intentionally not available directly through Selenium, because Selenium mission statement is to "emulate user actions" (and user does not see and interact with HTTP codes). See SeleniumHQ/selenium-google-code-issue-archive#141 for a discussion regarding this issue. However you have some options, see https://saucelabs.com/blog/options-for-validating-http-codes-in-selenium. |
Thanks, I had read both of those links before. They are kind of annoying responses and here's why: I have a page that requires the user to pass a valid client cert. My test should expect an HTTP response requesting a client cert. That's user actionable even though the code itself is not technically what the user sees. At any rate, this was a convenience thing. Of course there are 50 ways to solve it. It would just be nice if it was in the same package I'm already using for UI acceptance. Thanks for the quick reply! |
What are you trying to achieve? (Expected behavior)
I would like to be able to check HTTP response codes as part of my tests.
What do you get instead? (Actual behavior)
I can't see a way this data is exposed.
How could the issue be reproduced? (Steps to reproduce)
Just create a web driver and get/navigate to a page.
Details
The text was updated successfully, but these errors were encountered: