I write Tests with Selenium2/WebDriver and want to test if HTTP Request returns an HTTP 403 Forbidden.
Is it possible to get the http response status code with web driver?
|
In a word, no, it's not possible using the Selenium WebDriver API. This has been discussed ad nauseum in the issue tracker for the project, and the feature will not be added to the API. |
|||
|
Not sure this is what you're looking for, but I had a bit different goal is to check if remote image exists and I will not have 403 error, so you could use something like below:
|
|||||
|