Class LegerityTestClassExtensions
Defines a collection of extensions for LegerityTestClass instances.
Inheritance
Namespace: Legerity.Android.Extensions
Assembly: Legerity.Android.dll
Syntax
public static class LegerityTestClassExtensions : object
Methods
| Improve this Doc View SourceStartAndroidApp(LegerityTestClass, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32)
Starts the Android application ready for testing.
Declaration
public static AndroidDriver<AndroidElement> StartAndroidApp(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 |
---|---|
AndroidDriver<AndroidElement> | 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:
|
StartAndroidApp(LegerityTestClass, AndroidAppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32)
Starts the Android application ready for testing.
Declaration
public static AndroidDriver<AndroidElement> StartAndroidApp(this LegerityTestClass testClass, AndroidAppManagerOptions 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. |
AndroidAppManagerOptions | 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 |
---|---|
AndroidDriver<AndroidElement> | 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:
|