how to click on browser “stop loading this page” using ruby watir?

一世执手 提交于 2019-12-04 20:02:14

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.

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')"
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!