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();
我有:主页和对话框上的按钮。
A 想要托管 bean (NewDialog.java) 的 ViewScope 生命周期,执行对话框。换句话说:按下按钮时重新创建 NewDialog bean,并在关闭对话框时销毁。
但是在加载主页时已经创建了 NewDialog bean。如何仅在按下按钮时强制创建bean?