I'm trying to validate that a page redirect in an iframe is working correctly. Ideally a request gets sent from my server to our gateway server, and then redirected to an external page. However because of the way my page handles permissions, the best way to validate that this is succeeding is by confirming that the redirect has occurred and it is to the correct URL.
Using Robot / Selenium automation, is there a way to grab redirect URLs and status codes in order to compare them to an expected value? I've seen mixed answers on whether or not this is possible.
The javascript navigator object seems like it might solve this problem, but I'm not sure how to use it in the context of automation to retrieve redirect URLs.
Any advice is appreciated.