Skip to content

RefreshPage.cs

Avrigeanu Laurian edited this page Apr 11, 2023 · 1 revision

RefreshPage Method

Reloads the specified page.

Parameters

  • page : An IPage object representing the page to refresh.

Returns

An IPage object representing the refreshed page.

Remarks

This method refreshes the specified page object by calling the ReloadAsync method. This method is asynchronous and the Wait method is used to block until the page has been refreshed before returning. Finally, the method returns the refreshed page object.

This method depends on the ReloadAsync method, which is an asynchronous method defined in the Page class of the Microsoft.Playwright namespace. It also depends on the IPage object, which is an interface defined in the Microsoft.Playwright namespace.

RefreshPage Method (by index)

Reloads a page by its index in the browser's list of pages.

Parameters

  • index : An int value representing the index of the page to refresh.

Returns

An IPage object representing the refreshed page.

Remarks

This method retrieves the page at the specified index using the GetPageByIndex method, and then calls the RefreshPage method with the retrieved page object as a parameter. Finally, the method returns the refreshed page object.

This method depends on the GetPageByIndex method, which retrieves a page by its index, and the RefreshPage method, which refreshes a page by its IPage object.

Clone this wiki locally