Class WindowsApp
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Uia.dll
Capability for Windows UI apps.
public class WindowsApp : Adapter, IAdapter
- Inheritance
-
WindowsApp
- Implements
- Inherited Members
Constructors
WindowsApp()
Creates a new WindowsApp adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected WindowsApp()
WindowsApp(Element)
Creates a new WindowsApp adapter instance.
public WindowsApp(Element element)
Parameters
elementElementThe element to create the adapter for.
Exceptions
- NullReferenceException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Properties
AppFamilyName
The family name of the package the app belongs to.
public virtual string AppFamilyName { get; }
Property Value
AppFrameTitle
The title of the outer container frame.
public virtual string AppFrameTitle { get; }
Property Value
AppId
The ID of the app.
public virtual string AppId { get; }
Property Value
AppPath
The location where the app is installed at.
public virtual string AppPath { get; }
Property Value
AppPublisher
The publisher of the app.
public virtual string AppPublisher { get; }
Property Value
AppVersion
The version of the app.
public virtual Version AppVersion { get; }
Property Value
PackageName
The name of the package the app belongs to.
public virtual string PackageName { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Methods
AppDisableDebugging()
Disables the debugging mode for the app package.
public virtual void AppDisableDebugging()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
AppEnableDebugging()
Enables the debugging mode for the app package.
public virtual void AppEnableDebugging()
Exceptions
- ActionFailedException
Thrown if invoking the action failed.
FromElement(Element)
Converts an Element to an instance of this class.
public static WindowsApp FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- WindowsApp
The WindowsApp.
Exceptions
- ArgumentNullException
If
elementisnull.- 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 WindowsApp FromPath(string path)
Parameters
pathstringThe search path.
Returns
- WindowsApp
The WindowsApp.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
Operators
implicit operator WindowsApp(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator WindowsApp(Element element)
Parameters
elementElementThe element to convert.
Returns
- WindowsApp
The WindowsApp.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator WindowsApp(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator WindowsApp(string path)
Parameters
pathstringThe search path.
Returns
- WindowsApp
The WindowsApp.
Remarks
The DefaultSearchTimeout is used to search for the specified path.
Exceptions
- ArgumentNullException
If
pathisnull.- RxPathException
If the specified
pathis not valid.- ElementNotFoundException
If no element is found.
- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.