Method LoadUrl
- Namespace
- DotNetBrowser.Navigation
- Assembly
- DotNetBrowser.dll
LoadUrl(string)
Navigates to a resource identified by a URL.
Task<NavigationResult> LoadUrl(string url)
Parameters
urlstringThe URL of the resource to load. Cannot be null, empty or contain only white space.
Returns
- Task<NavigationResult>
A task that represents the asynchronous loading operation. The NavigationResult indicates if the loading operation has been completed, stopped or failed. The task can throw TimeoutException if the loading operation hasn't been completed within a default timeout (100 seconds).
Exceptions
- ArgumentException
The
urlis null, empty or contain only white space.- ObjectDisposedException
The INavigation has already been disposed.
LoadUrl(string, TimeSpan)
Navigates to a resource identified by a URL, with the specified timeout.
Task<NavigationResult> LoadUrl(string url, TimeSpan timeout)
Parameters
urlstringThe URL of the resource to load. Cannot be null, empty or contain only white space.
timeoutTimeSpanThe timeout for the loading operation.
Returns
- Task<NavigationResult>
A task that represents the asynchronous loading operation. The NavigationResult indicates if the loading operation has been completed, stopped or failed. The task can throw TimeoutException if the loading operation hasn't been completed within a
timeout.
Exceptions
- ArgumentException
The
urlis null, empty or contain only white space.- ObjectDisposedException
The INavigation has already been disposed.
LoadUrl(LoadUrlParameters)
Navigates to a resource identified by the specified parameters
Task<NavigationResult> LoadUrl(LoadUrlParameters parameters)
Parameters
parametersLoadUrlParametersThe parameters such as URL, POST data, and HTTP headers.
Returns
- Task<NavigationResult>
A task that represents the asynchronous loading operation. The NavigationResult indicates if the loading operation has been completed, stopped or failed. The task can throw TimeoutException if the loading operation hasn't been completed within a default timeout (100 seconds).
Exceptions
- ArgumentNullException
The
parametersis null.- ObjectDisposedException
The INavigation has already been disposed.
LoadUrl(LoadUrlParameters, TimeSpan)
Navigates to a resource identified by the given LoadUrlParameters, with the specified timout.
Task<NavigationResult> LoadUrl(LoadUrlParameters parameters, TimeSpan timeout)
Parameters
parametersLoadUrlParametersThe parameters such as URL, POST data, and HTTP headers.
timeoutTimeSpanThe timeout for the loading operation.
Returns
- Task<NavigationResult>
A task that represents the asynchronous loading operation. The NavigationResult indicates if the loading operation has been completed, stopped or failed. The task can throw TimeoutException if the loading operation hasn't been completed within a
timeout.
Exceptions
- ArgumentNullException
The
parametersis null.- ObjectDisposedException
The INavigation has already been disposed.