Table of Contents

Class IosApp

Namespace
Ranorex
Assembly
Ranorex.Plugin.Mobile.dll

A capability that adds additional attributes to elements that represent a mobile application.

public class IosApp : Adapter, IAdapter
Inheritance
IosApp
Implements
Inherited Members

Constructors

IosApp()

Creates a new IosApp adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!

protected IosApp()

IosApp(Element)

Creates a new IosApp adapter instance.

public IosApp(Element element)

Parameters

element Element

The element to create the adapter for.

Exceptions

NullReferenceException

If element is null.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.

Properties

RequiredCapabilities

Capabilities required by the adapter implementation.

protected override string[] RequiredCapabilities { get; }

Property Value

string[]

Methods

CloseApplication()

Closes the specified application on the corresponding device.

public virtual void CloseApplication()

Exceptions

ActionFailedException

Thrown if invoking the action failed.

FetchStartableApps()

Gets a list of application identifiers that can be used with Host.RunMobileApp to start an app on the device from within the Ranorex system.

public virtual void FetchStartableApps()

Exceptions

ActionFailedException

Thrown if invoking the action failed.

FromElement(Element)

Converts an Element to an instance of this class.

public static IosApp FromElement(Element element)

Parameters

element Element

The element to convert.

Returns

IosApp

The IosApp.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.

FromPath(string)

Converts a string to an instance of this class by searching the root.

public static IosApp FromPath(string path)

Parameters

path string

The search path.

Returns

IosApp

The IosApp.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.

GetDeviceInfo()

Gets system information about the android device.

public virtual IosDeviceInfo GetDeviceInfo()

Returns

IosDeviceInfo

System information from android device.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

StartApp(string, bool)

Starts an app on the device.

public virtual string StartApp(string App, bool ResetInitialState)

Parameters

App string

The package name of the application to start e.g. 'ranorex.services'. Use the FetchStartableApps command to get a list of valid values from the device.

ResetInitialState bool

Indicates if the app should be restarted on launch or just brought to the foreground in case the app is already running.

Returns

string

The value that will be returned by the action invocation.

Exceptions

ActionFailedException

Thrown if invoking the action failed.

Operators

implicit operator IosApp(Element)

Implicitly converts an Element to an instance of this class.

public static implicit operator IosApp(Element element)

Parameters

element Element

The element to convert.

Returns

IosApp

The IosApp.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.

implicit operator IosApp(string)

Implicitly converts a string to an instance of this class by searching the root.

public static implicit operator IosApp(string path)

Parameters

path string

The search path.

Returns

IosApp

The IosApp.

Remarks

The DefaultSearchTimeout is used to search for the specified path.

Exceptions

ArgumentNullException

If path is null.

RxPathException

If the specified path is not valid.

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

If the element does not support the capabilities required by this adapter.