Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 98893

How to catch HTTP 302 response via Selenium Webdriver?

$
0
0

I want to automate following scenario:

  1. Click on an image

  2. Before destination page, server redirects me to another URL (e.g abc.com).
    HTTP response--> 302 Found

  3. There is another redirection URL (e.g def.com).
    HTTP response--> 302 Found
  4. Destination URL is reached (e.g XYZ.com)
    HTTP response--> 301 Moved Permanently

I am interested in Step2. I just need to verify that (abc.com) received 302 response before xyz.com is reached. Is there any way to do so in Selenium Webdriver? If not, how can we implement in Java?


Viewing all articles
Browse latest Browse all 98893

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>