Refresh browser using selenium

0 votes
Except sendkeys(keys.F5);

Are there other ways to refresh the browser using selenium commands?
Jan 7 in Selenium by Anjali
• 2,930 points
154 views

Try using this method if you are using JS Executor:

driver.executeScript("location.reload();");

3 answers to this question.

0 votes
You can use navigate().refresh(). This works fine.
answered Jan 7 by Disha
0 votes
Try using getCurrentUrl().
answered Jan 7 by Trisha
+1 vote
Try navigate().to(driver.getCurrentUrl()). Works like charm.
answered Jan 7 by Mohan
driver.navigate().refresh();
@Harish, yeah that works fine for me.

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

Need to perform parallel execution (multiple browser sessions) with Selenium & TestNG by using @BeforeSuite

@Beforesuite annotated method runs before the testNG.XML ...READ MORE

answered Mar 30, 2018 in Selenium by nsv999
• 5,110 points
1,663 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
1,142 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,150 points
1,242 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,150 points
994 views
0 votes
1 answer

What are the different components of Selenium?

Selenium is a testing tool and comprises ...READ MORE

answered Jan 7 in Selenium by Fuji
327 views
0 votes
1 answer

Different API for selenium

Hey @User, there is this list that ...READ MORE

answered Jan 7 in Selenium by Fuji
37 views