I want to click on browser "stop loading this page" icon, when timeout error occurs,what should i do for it? Some thing like this:
browser.stop # this is wrong.
I searched forever and the best I could come up with was:
b = Watir::Browser.new
b.driver.manage.timeouts.implicit_wait = 3
This worked great for me with firefox.
Arup Rakshit
The below link may help you :
Just try this logic when you want to stop the loading,
@browser.send_keys :escape
It is not the best way of doing what you want but still the above approach worked out for me.
If you use Watir-Webdriver then you can try this for IE
@browser.execute_script "document.execCommand('Stop')"
来源:https://stackoverflow.com/questions/17592160/how-to-click-on-browser-stop-loading-this-page-using-ruby-watir