In Selenium RC, I used the following code using Java for refresh on the browser:
selenium.refresh();
What is the equivalent code for refresh in WebDriver?
In Selenium RC, I used the following code using Java for refresh on the browser:
selenium.refresh();
What is the equivalent code for refresh in WebDriver?
The following is the equivalent code in Selenium WebDriver using Java:
driver.navigate().refresh();
Another way to refresh by using Ctrl+F5: to use the WebDriver and Actions instance as below:
Actions actionObject = new Actions(driver);
actionObject.keyDown(Keys.CONTROL).sendKeys(Keys.F5).perform();