Class IosElement
- Namespace
- Ranorex
- Assembly
- Ranorex.Plugin.Mobile.dll
This capability adds iOS specific attributes to the UI element.
public class IosElement : Adapter, IAdapter
- Inheritance
-
IosElement
- Implements
- Inherited Members
Constructors
IosElement()
Creates a new IosElement adapter instance. This constructor is used internally by the Ranorex Core Framework for performance issues!
protected IosElement()
IosElement(Element)
Creates a new IosElement adapter instance.
public IosElement(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
AccessibilityHint
The accessibility hint specified for the iOS control.
public virtual string AccessibilityHint { get; }
Property Value
ControlTag
The tag that was assigned to the iOS control.
public virtual int ControlTag { get; }
Property Value
LocalizationKey
The key used to localize this UI element if there was found any. Use this key especially when no useful accessibility ID is available and you want to test your application for different localizations.
public virtual string LocalizationKey { get; }
Property Value
RequiredCapabilities
Capabilities required by the adapter implementation.
protected override string[] RequiredCapabilities { get; }
Property Value
- string[]
Methods
FromElement(Element)
Converts an Element to an instance of this class.
public static IosElement FromElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- IosElement
The IosElement.
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 IosElement FromPath(string path)
Parameters
pathstringThe search path.
Returns
- IosElement
The IosElement.
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 IosElement(Element)
Implicitly converts an Element to an instance of this class.
public static implicit operator IosElement(Element element)
Parameters
elementElementThe element to convert.
Returns
- IosElement
The IosElement.
Exceptions
- ArgumentNullException
If
elementisnull.- CapabilityNotSupportedException
If the element does not support the capabilities required by this adapter.
implicit operator IosElement(string)
Implicitly converts a string to an instance of this class by searching the root.
public static implicit operator IosElement(string path)
Parameters
pathstringThe search path.
Returns
- IosElement
The IosElement.
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.