How to check URL for 404 using Selenium WebDriver?

前端 未结 6 1757
时光说笑
时光说笑 2021-02-01 20:44

What is the most convenient way using Selenium WebDriver to check if an URL GET returns successfully (HTTP 200)?

In this particular case I\'m most interested in verifyin

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-01 21:18

    One of the alternative solutions is analyzing web server logs after test executing. This approach allows to catch not only missed images, but css, scripts and other resources.

    Description of how to do it is here.

提交回复
热议问题