The ways to refresh a browser using Selenium WebDriver

ID

Way

Detail

1

driver.get(url)

To open an URL and it will wait till the whole page get loaded.

When the page is loading, selenium will not perform any action until the page is fully loaded

2

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

To navigate on current URL

3

driver.navigate().get(url)

To navigate to an URL and it will NOT wait till the whole page get loaded

4

driver.naviagate().refresh()

To refresh the current web page thereby reloading all the web elements

5

add.sendKeys(Keys.F5)

On any textbox on the web page

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章