Search Results for

    Show / Hide Table of Contents

    Class AppManager

    Defines a manager for the application under test.

    Inheritance
    System.Object
    AppManager
    Namespace: Legerity
    Assembly: Legerity.Core.dll
    Syntax
    public static class AppManager : object

    Properties

    | Improve this Doc View Source

    AndroidApp

    Gets the instance of the started Android application.

    Declaration
    public static AndroidDriver<AndroidElement> AndroidApp { get; }
    Property Value
    Type Description
    AndroidDriver<AndroidElement>
    Remarks

    This instance should not be used in parallelized test runs. Instead, use the instance returned by the StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32) method.

    | Improve this Doc View Source

    App

    Gets or sets the instance of the started application.

    This could be a , , , or web driver.

    Declaration
    public static RemoteWebDriver App { get; set; }
    Property Value
    Type Description
    RemoteWebDriver
    Remarks

    This instance should not be used in parallelized test runs. Instead, use the instance returned by the StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32) method.

    | Improve this Doc View Source

    Apps

    Gets the instances of started applications.

    Declaration
    public static IReadOnlyCollection<RemoteWebDriver> Apps { get; }
    Property Value
    Type Description
    IReadOnlyCollection<RemoteWebDriver>
    | Improve this Doc View Source

    IOSApp

    Gets the instance of the started iOS application.

    Declaration
    public static IOSDriver<IOSElement> IOSApp { get; }
    Property Value
    Type Description
    IOSDriver<IOSElement>
    Remarks

    This instance should not be used in parallelized test runs. Instead, use the instance returned by the StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32) method.

    | Improve this Doc View Source

    WebApp

    Gets the instance of the started web application.

    Declaration
    public static RemoteWebDriver WebApp { get; }
    Property Value
    Type Description
    RemoteWebDriver
    Remarks

    This instance should not be used in parallelized test runs. Instead, use the instance returned by the StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32) method.

    | Improve this Doc View Source

    WindowsApp

    Gets the instance of the started Windows application.

    Declaration
    public static WindowsDriver<WindowsElement> WindowsApp { get; }
    Property Value
    Type Description
    WindowsDriver<WindowsElement>
    Remarks

    This instance should not be used in parallelized test runs. Instead, use the instance returned by the StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32) method.

    Methods

    | Improve this Doc View Source

    StartApp(AppManagerOptions, Func<IWebDriver, Boolean>, Nullable<TimeSpan>, Int32)

    Starts the application ready for testing.

    Declaration
    public static RemoteWebDriver StartApp(AppManagerOptions opts, Func<IWebDriver, bool> waitUntil = null, TimeSpan? waitUntilTimeout = null, int waitUntilRetries = 0)
    Parameters
    Type Name Description
    AppManagerOptions opts

    The options to configure the driver with.

    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
    RemoteWebDriver

    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 Appium server could not be found when running with LaunchAppiumServer or LaunchAppiumServer true.
    • 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

    StopApp(RemoteWebDriver, Boolean)

    Stops an application driver, with an option to stop the running Appium or WinAppDriver server.

    Declaration
    public static void StopApp(RemoteWebDriver app, bool stopServer = false)
    Parameters
    Type Name Description
    RemoteWebDriver app

    The instance to stop running.

    System.Boolean stopServer

    An optional value indicating whether to stop the running Appium or WinAppDriver server. Default, false.

    | Improve this Doc View Source

    StopApp(Boolean)

    Stops the App, with an option to stop the running Appium or WinAppDriver server.

    Declaration
    public static void StopApp(bool stopServer = true)
    Parameters
    Type Name Description
    System.Boolean stopServer

    An optional value indicating whether to stop the running Appium or WinAppDriver server. Default, true.

    | Improve this Doc View Source

    StopApps()

    Stops all running application drivers.

    Declaration
    public static void StopApps()
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright (c) MADE Apps