Class LegerityTestClassExtensions
Defines a collection of extensions for LegerityTestClass instances.
Inheritance
Namespace: Legerity.Windows.Extensions
Assembly: Legerity.Windows.dll
Syntax
public static class LegerityTestClassExtensions : object
Methods
| Improve this Doc View SourceStartWindowsApp(LegerityTestClass, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32)
Starts the Windows application ready for testing.
Declaration
public static WindowsDriver<WindowsElement> StartWindowsApp(this LegerityTestClass testClass, Func<IWebDriver, bool> waitUntil = null, TimeSpan? waitUntilTimeout = null, int waitUntilRetries = 0)
Parameters
Type | Name | Description |
---|---|---|
LegerityTestClass | testClass | The test class to launch an Android application for. |
Func<IWebDriver, System.Boolean> | waitUntil | An optional condition of the driver to wait on until it is met. |
System.Nullable<TimeSpan> | waitUntilTimeout | An optional timeout wait on the conditional wait until being true. If not set, the wait will run immediately, and if not valid, will throw an exception. |
System.Int32 | waitUntilRetries | An optional count of retries after a timeout on the wait until condition before accepting the failure. |
Returns
Type | Description |
---|---|
WindowsDriver<WindowsElement> | The configured and running application driver. |
Exceptions
Type | Condition |
---|---|
DriverLoadFailedException | Thrown when the application is null, the session ID is null once initialized, or the driver fails to configure correctly before returning. |
LegerityException | Thrown when:
|
StartWindowsApp(LegerityTestClass, WindowsAppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32)
Starts the Windows application ready for testing.
Declaration
public static WindowsDriver<WindowsElement> StartWindowsApp(this LegerityTestClass testClass, WindowsAppManagerOptions options, Func<IWebDriver, bool> waitUntil = null, TimeSpan? waitUntilTimeout = null, int waitUntilRetries = 0)
Parameters
Type | Name | Description |
---|---|---|
LegerityTestClass | testClass | The test class to launch an Android application for. |
WindowsAppManagerOptions | options | The optional options to configure the driver with. Settings this will override the Options if previously set. |
Func<IWebDriver, System.Boolean> | waitUntil | An optional condition of the driver to wait on until it is met. |
System.Nullable<TimeSpan> | waitUntilTimeout | An optional timeout wait on the conditional wait until being true. If not set, the wait will run immediately, and if not valid, will throw an exception. |
System.Int32 | waitUntilRetries | An optional count of retries after a timeout on the wait until condition before accepting the failure. |
Returns
Type | Description |
---|---|
WindowsDriver<WindowsElement> | The configured and running application driver. |
Exceptions
Type | Condition |
---|---|
DriverLoadFailedException | Thrown when the application is null, the session ID is null once initialized, or the driver fails to configure correctly before returning. |
LegerityException | Thrown when:
|