Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Equivalent code of selenium.refresh() in Selenium WebDriver (Selenium 2) using Java

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?

like image 601
Nazifa Chowdhury Avatar asked Aug 31 '12 09:08

Nazifa Chowdhury


People also ask

What is refresh command in Selenium?

refresh command: This is the inbuilt method for performing page refresh operation provided by Selenium web driver. This command is the most commonly used command across test automation for performing a page refresh operation. Refresh command can be used in a simple way as mentioned below. driver.

Which of the following code will be used to refresh the application window using action method?

navigate(). refresh(); Method, or can send key F5. Here, Web Page refresh can be achieved by using Actions class of the selenium WebDriver.

How many ways we can refresh page in Selenium?

In this tutorial, we will learn four different ways to refresh the page in Selenium Webdriver. While automating a web application there may be certain cases wherein you may require to refresh the page.


1 Answers

The following is the equivalent code in Selenium WebDriver using Java:

driver.navigate().refresh();
like image 134
Ripon Al Wasim Avatar answered Oct 09 '22 19:10

Ripon Al Wasim