Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经使用 java 刷新了 WebDriver 中的浏览器,如下代码:
driver.navigate().refresh();
如何通过在使用 Java 的 WebDriver 中按 Ctrl+F5 来做到这一点?
我认为您可以使用 WebDriver 和 Actions 实例,如下所示:
Actions actionObject = new Actions(driver); actionObject.keyDown(Keys.CONTROL).sendKeys(Keys.F5).keyUp(Keys.CONTROL).perform();