Search Results for

    Show / Hide Table of Contents

    Class LegerityTestClassExtensions

    Defines a collection of extensions for LegerityTestClass instances.

    Inheritance
    System.Object
    LegerityTestClassExtensions
    Namespace: Legerity.Windows.Extensions
    Assembly: Legerity.Windows.dll
    Syntax
    public static class LegerityTestClassExtensions : object

    Methods

    | Improve this Doc View Source

    StartWindowsApp(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:

    • The WinAppDriver could not be found when running with LaunchWinAppDriver true.
    • The WinAppDriver failed to load when running with LaunchWinAppDriver true.
    | Improve this Doc View Source

    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:

    • The WinAppDriver failed to load when running with LaunchWinAppDriver true.
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps