Using the response object
The response is an important concept on the web. There is a corresponding response for every request the browser sends to the server.
It makes sense that the goto
returns a response
. It makes a request
, and the result is the corresponding response
.
There are many things we can do with the response. We won't cover all the functionality in this chapter. But these are the most relevant functions we can use as a response to a goto
action.
Getting the response URL
Why would I want to know the URL if I know the URL I want to go to?
The server could redirect you to another page. For instance, if you open the browser in incognito/private mode and navigate to https://mail.google.com/, you will see that the server redirects you to https://accounts.google.com/signin.
I'm not saying that you should always check the response URL just in case, but you have to know that the site you are testing might behave like that. One common scenario is the...