标签: selenium selenium-webdriver webdriver chrome-web-driver
WebDriver API中是否有命令停止页面加载?我有一种情况,页面需要永远加载,即使我想要的所有东西都存在。我只是想模拟手动点击URL栏旁边的X按钮以停止页面加载。
答案 0 :(得分:0)
您可以使用Javascript执行程序停止窗口或发送密钥Keys.ESCAPE。
有关详细信息,请参阅:https://sqa.stackexchange.com/questions/5663/is-it-possible-to-stop-page-loading-on-the-browser-using-selenium-web-driver