Skip to main content

There are multiple ways, 5 of them are mentioned below:

1. Using driver.navigate command:

driver.navigate().refresh();

2. Using driver.getCurrentUrl() with driver.get() command:

driver.get(driver.getCurrentUrl()); 

3. Using driver.getCurrentUrl() with driver.navigate() command:

driver.navigate().to(driver.getCurrentUrl());  

4. Pressing an F5 key on any textbox using the sendKeys command:

driver.findElement(By textboxLocator).sendKeys(Keys.F5);

5. Passing ascii value of the F5 key, i.e., "\uE035" using the sendKeys command:

driver.findElement(By textboxLocator).sendKeys("\uE035"); 

About

Elix is a premium wordpress theme for portfolio, freelancer, design agencies and a wide range of other design institutions.