Java Selenium 5种方法实现刷新

383人浏览 / 0人评论

Java Selenium 5种方法实现刷新

1.driver.navigate().refresh();
2.driver.get(driver.getCurrentUrl());
3.driver.navigate().to(driver.getCurrentUrl());
4.driver.findElement(By.id("Contact-us")).sendKeys(Keys.F5); 
5.driver.executeScript("history.go(0)");

 

全部评论