I'm using protractor for e2e testing.
I want to visit a url, say:
browser.get("http://my.test.com");
And get the http status code and all the response body text, but I can't find a way to get them. Is there any methods I can use?
I'm using protractor for e2e testing.
I want to visit a url, say:
browser.get("http://my.test.com");
And get the http status code and all the response body text, but I can't find a way to get them. Is there any methods I can use?
Getting the http status code it's not possible since it's been resolved that selenium webdriver API won't add it and Protractor depends on Selenium for interacting with the browser.
You'll need to find a workaround for this, e.g. using NodeJS given that Protractor runs inside it with a helper function that understand promises so Protractor waits for the http get before continuing:
Other option might be changing the html server side accordingly to the response status code as in this blog post