How can I use Selenium RC to verify our Server-Side-Redirects (301, 302)?

前端 未结 2 523
礼貌的吻别
礼貌的吻别 2021-01-06 00:54

We have a bunch of redirects in our Apache configuration. I would like to automate the testing of redirects with Selenium, which led me to some problems:

  • Call
2条回答
  •  一生所求
    2021-01-06 00:59

    Selenium-RC has a traffic capture mode, defined as selenium.start("captureNetworkTraffic=true"); that will enable you to capture HTTP responses, including redirects and error codes.

    Here is an excellent resource on how to capture and process/format this information once retrieved. It uses Python, though, but should give you a start.

    For checking the URL of browser, you could use selenium.getLocation();

提交回复
热议问题