How to deal with a page which fails to load and continue testing in Watir-Webdriver

前端 未结 2 406
温柔的废话
温柔的废话 2021-01-16 12:19

I have looked for answer on other questions but I can\'t find one.

My problem is that I have a number of results that I need to test but my script keeps failing when

2条回答
  •  囚心锁ツ
    2021-01-16 12:52

    I am not sure how would you test a page that did not load, but try something like this:

    begin
      browser.goto "http://www.mycounciltax.org.uk/results?postcode=WC1N1DF&search=Search"
    rescue => e
      puts "rescued #{e}"
    end
    

提交回复
热议问题