BrowserPage Class
A page of a WebAppBrowser: navigate it, act on its elements, and check the result.
public sealed class BrowserPage : TestPage- Inheritance
TestPageBrowserPage
Properties
| Name | Description |
|---|---|
| Browser | Gets the browser of the page. |
Browser
BrowserPage.csMethods
| Name | Description |
|---|---|
| GoBackAsync(CancellationToken) | Goes back in the history, and waits until the page is loaded. Does nothing at the first entry of the history. |
| GoForwardAsync(CancellationToken) | Goes forward in the history, and waits until the page is loaded. Does nothing at the last entry of the history. |
| GoToAsync(string, CancellationToken) | Navigates to a URL, and waits until the new document is loaded (its load event). |
| ReloadAsync(CancellationToken) | Reloads the page, and waits until the new document is loaded. |
GoBackAsync(CancellationToken)
BrowserPage.csGoes back in the history, and waits until the page is loaded. Does nothing at the first entry of the history.
public Task GoBackAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken- A token to cancel the wait.
Returns
Task A task completed once the page is loaded.
GoForwardAsync(CancellationToken)
BrowserPage.csGoes forward in the history, and waits until the page is loaded. Does nothing at the last entry of the history.
public Task GoForwardAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken- A token to cancel the wait.
Returns
Task A task completed once the page is loaded.
GoToAsync(string, CancellationToken)
BrowserPage.csNavigates to a URL, and waits until the new document is loaded (its load event).
public Task GoToAsync(string url, CancellationToken cancellationToken = default)Parameters
urlstring- The URL, relative to
WebAppBrowser.BaseAddress. cancellationTokenCancellationToken- A token to cancel the wait.
Returns
Task A task completed once the document is loaded.
ReloadAsync(CancellationToken)
BrowserPage.csReloads the page, and waits until the new document is loaded.
public Task ReloadAsync(CancellationToken cancellationToken = default)Parameters
cancellationTokenCancellationToken- A token to cancel the wait.
Returns
Task A task completed once the document is loaded.