Table of Contents

Class Adapter

Namespace
Ranorex
Assembly
Ranorex.Core.dll

The base class for all role and capability adapters.

public abstract class Adapter : IAdapter
Inheritance
Adapter
Implements
Derived
Inherited Members

Constructors

Adapter()

Creates a new instance that has no Element assigned to it. This constructor is used internally by the Ranorex Core Framework for performance issues!

protected Adapter()

Adapter(Element)

Checks if the element provides the required capabilities for this adapter.

protected Adapter(Element element)

Parameters

element Element

The element to construct an adapter for.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

Properties

Children

Gets the immediate children of this adapter.

public IList<Unknown> Children { get; }

Property Value

IList<Unknown>

DefaultSearchTimeout

The timeout used when adapters are searched by assigning a path to an adapter variable (implicit cast operator).

public static Duration DefaultSearchTimeout { get; set; }

Property Value

Duration

Examples

The timeout value set to this property is used for searching when implicitly casting a path (in its string representation) to an adapter variable:

Button button = "pathToButton";

Remarks

This property is equivalent to DefaultSearchTimeout.

DefaultUseEnsureVisible

Gets or sets the default value for the UseEnsureVisible property.

public static bool DefaultUseEnsureVisible { get; set; }

Property Value

bool

Remarks

The value of this property is used if the UseEnsureVisible property of an adapter is set to a null reference.

Element

The element associated with this adapter.

public Element Element { get; protected set; }

Property Value

Element

Exceptions

CapabilityNotSupportedException

If setting the value of this property and the element does not support the capabilities required by this adapter.

Enabled

True if the element is enabled.

public bool Enabled { get; }

Property Value

bool

FlavorName

The name of the flavor this element belongs to.

public string FlavorName { get; }

Property Value

string

HasFocus

True if the element has the focus.

public bool HasFocus { get; }

Property Value

bool

IsSnapshot

Gets a value indicating whether this instance is a snapshot.

public bool IsSnapshot { get; }

Property Value

bool

true if this instance is a snapshot; otherwise, false.

Parent

Gets the parent of this adapter.

public Unknown Parent { get; }

Property Value

Unknown

RequiredCapabilities

Implemented by the derived class.

protected abstract string[] RequiredCapabilities { get; }

Property Value

string[]

ScreenRectangle

The bounding rectangle of the element in screen coordinates.

public Rectangle ScreenRectangle { get; }

Property Value

Rectangle

TimeoutFactor

Gets or sets a value that all timeouts of find operations are multiplied with.

public static double TimeoutFactor { get; set; }

Property Value

double

UseEnsureVisible

Gets or sets a value indicating whether EnsureVisible() should be called before Click(), DoubleClick(), or MoveTo() actions on this adapter instance.

[TypeConverter(typeof(NullableBoolTypeConverter))]
public bool? UseEnsureVisible { get; set; }

Property Value

bool?

Set this property to a null reference to use the default value specified by DefaultUseEnsureVisible.

Valid

Returns true if the element is believed to be valid.

public bool Valid { get; }

Property Value

bool

Visible

True if the element is visible.

public bool Visible { get; }

Property Value

bool

Methods

As<T>()

Returns an adapter of the specified type for the underlying element of the current adapter.

public T As<T>() where T : Adapter

Returns

T

The specified adapter or null if the underlying element does not provide the capabilites required for the adapter.

Type Parameters

T

The adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

CaptureCompressedImage()

Captures a PNG image of the element.

public CompressedImage CaptureCompressedImage()

Returns

CompressedImage

A compressed image of the element.

Click()

Clicks on the adapter with the left mouse button.

public void Click()

Remarks

If this method is invoked on a mobile element, Touch() will be called internally.

Click(Duration)

Clicks on the adapter with the left mouse button.

public void Click(Duration moveTime)

Parameters

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

Click(Location)

Clicks on the adapter at the specified location.

public void Click(Location location)

Parameters

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally.

Click(Location, Duration)

Clicks on the adapter at a specific location.

public void Click(Location location, Duration moveTime)

Parameters

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Click(Location, int, Duration)

Clicks on the adapter at a specific location, with the left mouse button, the specified number of times.

public void Click(Location location, int times, Duration moveTime)

Parameters

location Location

The location to click at.

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Click(int, Duration)

Clicks on the adapter with the left mouse button the specified number of times.

public void Click(int times, Duration moveTime)

Parameters

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

Click(MouseButtons)

Clicks on the adapter with the specified mouse buttons.

public void Click(MouseButtons buttons)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

Click(MouseButtons, Duration)

Clicks on the adapter with the specified mouse buttons.

public void Click(MouseButtons buttons, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

Click(MouseButtons, Location)

Clicks on the adapter with the specified mouse buttons at a specific location location.

public void Click(MouseButtons buttons, Location location)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Click(MouseButtons, Location, Duration)

Clicks on the adapter with the specified mouse buttons at a given location.

public void Click(MouseButtons buttons, Location location, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Click(MouseButtons, Location, int, Duration)

Clicks at the specified location relative to the adapter with the specified mouse buttons the specified number of times.

public void Click(MouseButtons buttons, Location location, int times, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location relative to the upper-left corner of the element to click on.

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Click(MouseButtons, int, Duration)

Clicks on the adapter with the specified mouse buttons the specified number of times.

public void Click(MouseButtons buttons, int times, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

ClickWithoutBoundsCheck(Location)

Clicks on the adapter at the specified location, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(Location location)

Parameters

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally.

ClickWithoutBoundsCheck(Location, Duration)

Clicks on the adapter at a specific location, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(Location location, Duration moveTime)

Parameters

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

ClickWithoutBoundsCheck(Location, int, Duration)

Clicks on the adapter at a specific location, with the left mouse button, the specified number of times, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(Location location, int times, Duration moveTime)

Parameters

location Location

The location to click at.

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

ClickWithoutBoundsCheck(MouseButtons, Location)

Clicks on the adapter with the specified mouse buttons at a specific location location, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(MouseButtons buttons, Location location)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

ClickWithoutBoundsCheck(MouseButtons, Location, Duration)

Clicks on the adapter with the specified mouse buttons at a given location, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(MouseButtons buttons, Location location, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

ClickWithoutBoundsCheck(MouseButtons, Location, int, Duration)

Clicks at the specified location relative to the adapter with the specified mouse buttons the specified number of times, without reporting a warning if the location is outside the element.

public void ClickWithoutBoundsCheck(MouseButtons buttons, Location location, int times, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location relative to the upper-left corner of the element to click on.

times int

The number of times to click.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called internally and only the location argument will be considered.

Create(Type, Element)

Constructs an adapter of a specific type for a given element.

public static Adapter Create(Type adapterType, Element element)

Parameters

adapterType Type

The type of adapter to construct. The supplied type must inherit from Adapter, but must not be the Adapter type itself.

element Element

The element associated with the adapter.

Returns

Adapter

The adapter instance.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

RanorexCoreException

Thrown if the adapterType does not inherit from Adapter.

RanorexException

If generating the adapter fails for another reason.

Create<T>(Element)

Constructs an adapter of a specific type for a given element.

public static T Create<T>(Element element) where T : Adapter

Parameters

element Element

The element associated with the adapter.

Returns

T

The adapter instance.

Type Parameters

T

The type of adapter to construct. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Exceptions

ArgumentNullException

If element is null.

CapabilityNotSupportedException

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

RanorexException

If generating the adapter fails for another reason.

DoubleClick()

DoubleClicks on the adapter with the left mouse button.

public void DoubleClick()

Remarks

If this method is invoked on a mobile element, Touch() will be called twice internally.

DoubleClick(Duration)

DoubleClicks on the adapter with the left mouse button.

public void DoubleClick(Duration moveTime)

Parameters

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called twice internally and the arguments will not be considered.

DoubleClick(Location)

DoubleClicks on the adapter with the left mouse button at a specific location location.

public void DoubleClick(Location location)

Parameters

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally.

DoubleClick(Location, Duration)

DoubleClicks on the adapter at a specific location.

public void DoubleClick(Location location, Duration moveTime)

Parameters

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleClick(MouseButtons)

DoubleClicks on the adapter with the specified mouse buttons.

public void DoubleClick(MouseButtons buttons)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

Remarks

If this method is invoked on a mobile element, Touch() will be called twice internally and the arguments will not be considered.

DoubleClick(MouseButtons, Duration)

DoubleClicks on the adapter with the specified mouse buttons.

public void DoubleClick(MouseButtons buttons, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called twice internally and the arguments will not be considered.

DoubleClick(MouseButtons, Location)

DoubleClicks on the adapter with the specified mouse buttons at a specific location location.

public void DoubleClick(MouseButtons buttons, Location location)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleClick(MouseButtons, Location, Duration)

DoubleClicks on the adapter with the specified mouse buttons at a given location.

public void DoubleClick(MouseButtons buttons, Location location, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleClickWithoutBoundsCheck(Location)

DoubleClicks on the adapter with the left mouse button at a specific location location, without reporting a warning if the location is outside the element.

public void DoubleClickWithoutBoundsCheck(Location location)

Parameters

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally.

DoubleClickWithoutBoundsCheck(Location, Duration)

DoubleClicks on the adapter at a specific location, without reporting a warning if the location is outside the element.

public void DoubleClickWithoutBoundsCheck(Location location, Duration moveTime)

Parameters

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleClickWithoutBoundsCheck(MouseButtons, Location)

DoubleClicks on the adapter with the specified mouse buttons at a specific location location, without reporting a warning if the location is outside the element.

public void DoubleClickWithoutBoundsCheck(MouseButtons buttons, Location location)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleClickWithoutBoundsCheck(MouseButtons, Location, Duration)

DoubleClicks on the adapter with the specified mouse buttons at a given location, without reporting a warning if the location is outside the element.

public void DoubleClickWithoutBoundsCheck(MouseButtons buttons, Location location, Duration moveTime)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

location Location

The location to click at.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch(Location) will be called twice internally and only the location argument will be considered.

DoubleTap()

Performs a double tap action on the adapter.

public void DoubleTap()

DoubleTap(Location)

Performs a double tap action on the adapter with the specified location.

public void DoubleTap(Location location)

Parameters

location Location

The location to touch at.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

DoubleTap(double, double)

Performs a double tap action on the adapter with the specified location.

public void DoubleTap(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

DoubleTap(int, int)

Performs a double tap action on the adapter with the specified location.

public void DoubleTap(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

DoubleTapWithoutBoundsCheck(Location)

Performs a double tap action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void DoubleTapWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

DoubleTapWithoutBoundsCheck(double, double)

Performs a double tap action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void DoubleTapWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

DoubleTapWithoutBoundsCheck(int, int)

Performs a double tap action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void DoubleTapWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

EnsureVisible()

Ensures that the element is visible to the user. This is usually accomplished by bringing the element or one of its ancestors to foreground.

public bool EnsureVisible()

Returns

bool

True if the operation has suceeded.

Filter<T>(IList<Element>)

Filters the given element list by the specified adapter type. The returned adapter list correspond to the elements that could be converted to the specified adapter type.

public IList<T> Filter<T>(IList<Element> elements) where T : Adapter

Parameters

elements IList<Element>

A list of elements.

Returns

IList<T>

A list of adapter instances corresponding to the elements that could be converted to the specified adapter.

Type Parameters

T

The type of adapter to filter by. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Find(RxPath)

Applies a Ranorex Path to the adapter, returning all elements which match the path.

public IList<Element> Find(RxPath path)

Parameters

path RxPath

The RxPath to apply.

Returns

IList<Element>

The result list of the path.

Find(RxPath, Duration)

Applies a Ranorex Path to the adapter, returning all elements which match the path.

public IList<Element> Find(RxPath path, Duration timeout)

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for at least one element matching the path.

Returns

IList<Element>

The result list of the path.

FindChild<T>()

Finds an immediate child element of the given capability adapter type.

public T FindChild<T>() where T : Adapter

Returns

T

The matching element adapter.

Type Parameters

T

The adapter type to use. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Exceptions

ElementNotFoundException

If no element is found.

FindChildren<T>()

Finds immediate child elements of the given capability adapter type.

public IList<T> FindChildren<T>() where T : Adapter

Returns

IList<T>

A list of matching element adapters.

Type Parameters

T

The adapter type to use. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

FindDescendant<T>()

Finds a descendant of the given capability adapter type.

public T FindDescendant<T>() where T : Adapter

Returns

T

The matching element adapter.

Type Parameters

T

The adapter type to use. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Exceptions

ElementNotFoundException

If no element is found.

FindDescendants<T>()

Finds all descendants of the given capability adapter type.

public IList<T> FindDescendants<T>() where T : Adapter

Returns

IList<T>

A list of matching element adapters.

Type Parameters

T

The adapter type to use. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

FindSingle(RxPath)

Applies a Ranorex Path to the adapter, returning an Element.

public Element FindSingle(RxPath path)

Parameters

path RxPath

The RxPath to apply.

Returns

Element

The first element found.

Exceptions

ElementNotFoundException

If no element is found.

FindSingle(RxPath, Duration)

Applies a Ranorex Path to the adapter, returning an Element.

public Element FindSingle(RxPath path, Duration timeout)

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for the element.

Returns

Element

The first element found.

Exceptions

ElementNotFoundException

If no element is found within the timeout.

FindSingle<T>(RxPath)

Applies a Ranorex Path to the adapter, returning a specific adapter type (e.g. Role or Capability).

public T FindSingle<T>(RxPath path) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

Returns

T

The first element found converted to the specified adapter type.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Exceptions

ElementNotFoundException

If no element is found.

CapabilityNotSupportedException

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

FindSingle<T>(RxPath, Duration)

Applies a Ranorex Path to the adapter, returning a specific adapter type (e.g. Role or Capability).

public T FindSingle<T>(RxPath path, Duration timeout) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for the element.

Returns

T

The first element found converted to the specified adapter type.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Exceptions

ElementNotFoundException

If no element is found within the timeout.

CapabilityNotSupportedException

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

Find<T>(RxPath)

Applies a Ranorex Path to the adapter, returning instances of a specific adapter type (e.g. Role or Capability).

public IList<T> Find<T>(RxPath path) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

Returns

IList<T>

The result list of the path.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Find<T>(RxPath, Duration)

Applies a Ranorex Path to the adapter, returning instances of a specific adapter type (e.g. Role or Capability).

public IList<T> Find<T>(RxPath path, Duration timeout) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for at least one element matching the path.

Returns

IList<T>

The result list of the path.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Focus()

Tries to set the focus on the element.

public void Focus()

GetAttributeValue<T>(string)

Gets an attribute value using a generic return type.

public T GetAttributeValue<T>(string name)

Parameters

name string

The name of the attribute.

Returns

T

The attribute value of the specified type or the default type value if the attribute was not available.

Type Parameters

T

The type of the attribute.

GetPath()

Builds an absolute RxPath to the element, using the 'Default' path-build mode.

public RxPath GetPath()

Returns

RxPath

The path for the element represented by the adapter.

GetPath(PathBuildMode)

Builds an absolute RxPath to the element.

public RxPath GetPath(PathBuildMode buildMode)

Parameters

buildMode PathBuildMode

Specifies how the path should be built. (optimization vs. runtime tradeoff)

Returns

RxPath

The path of the element.

ListToSingleOrNull<T>(IList<T>)

Returns the first item in the list or null if the list is empty.

protected static T ListToSingleOrNull<T>(IList<T> list) where T : Adapter

Parameters

list IList<T>

A list of adapters.

Returns

T

The first item in the list or null if the list is empty.

Type Parameters

T

The type of adapters in the list. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

LongTouch()

Performs a long touch action on the adapter.

public void LongTouch()

LongTouch(Duration)

Performs a long touch action on the adapter.

public void LongTouch(Duration touchDuration)

Parameters

touchDuration Duration

The duration between the down and up phase of the touch.

LongTouch(Location)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(Location location)

Parameters

location Location

The location to touch at.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

LongTouch(Location, Duration)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(Location location, Duration touchDuration)

Parameters

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

LongTouch(double, double)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

LongTouch(double, double, Duration)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(double x, double y, Duration touchDuration)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

touchDuration Duration

The duration between the down and up phase of the touch.

LongTouch(int, int)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

LongTouch(int, int, Duration)

Performs a long touch action on the adapter with the specified location.

public void LongTouch(int x, int y, Duration touchDuration)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

touchDuration Duration

The duration between the down and up phase of the touch.

LongTouchWithoutBoundsCheck(Location)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

LongTouchWithoutBoundsCheck(Location, Duration)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(Location location, Duration touchDuration)

Parameters

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

Remarks

If this method is invoked on a local element, Click(MouseButtons, Location) will be called internally performing a click with the right mouse button.

LongTouchWithoutBoundsCheck(double, double)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

LongTouchWithoutBoundsCheck(double, double, Duration)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(double x, double y, Duration touchDuration)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

touchDuration Duration

The duration between the down and up phase of the touch.

LongTouchWithoutBoundsCheck(int, int)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

LongTouchWithoutBoundsCheck(int, int, Duration)

Performs a long touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void LongTouchWithoutBoundsCheck(int x, int y, Duration touchDuration)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

touchDuration Duration

The duration between the down and up phase of the touch.

MouseDown(MouseButtons)

Holds down on the adapter with the specified mouse buttons.

public void MouseDown(MouseButtons buttons)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

MouseUp(MouseButtons)

Releases on the adapter with the specified mouse buttons.

public void MouseUp(MouseButtons buttons)

Parameters

buttons MouseButtons

A bit-wise combination of MouseButtons values that specify the mouse buttons for this action.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

MoveTo()

Moves the mouse to the adapter.

public void MoveTo()

Remarks

If this method is invoked on a mobile element, Touch() will be called internally.

MoveTo(Duration)

Moves the mouse to the adapter.

public void MoveTo(Duration moveTime)

Parameters

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, Touch() will be called internally and the arguments will not be considered.

MoveTo(Location)

Moves the mouse to the specified location in the adapter.

public void MoveTo(Location location)

Parameters

location Location

The location relative to the adapter to move to.

Remarks

If this method is invoked on a mobile element, TouchMove(Location) will be called internally and only the location argument will be considered.

MoveTo(Location, Duration)

Moves the mouse to the specified location in the adapter.

public void MoveTo(Location location, Duration moveTime)

Parameters

location Location

The location relative to the adapter to move to.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, TouchMove(Location) will be called internally and only the location argument will be considered.

MoveToWithoutBoundsCheck(Location)

Moves the mouse to the specified location in the adapter, without reporting a warning if the location is outside the element.

public void MoveToWithoutBoundsCheck(Location location)

Parameters

location Location

The location relative to the adapter to move to.

Remarks

If this method is invoked on a mobile element, TouchMove(Location) will be called internally and only the location argument will be considered.

MoveToWithoutBoundsCheck(Location, Duration)

Moves the mouse to the specified location in the adapter, without reporting a warning if the location is outside the element.

public void MoveToWithoutBoundsCheck(Location location, Duration moveTime)

Parameters

location Location

The location relative to the adapter to move to.

moveTime Duration

The time after which the mouse should be at the specified position.

Remarks

If this method is invoked on a mobile element, TouchMove(Location) will be called internally and only the location argument will be considered.

PressKeys(string)

Tries to set focus to the adapter and then presses the keys specified by sequence.

public void PressKeys(string sequence)

Parameters

sequence string

A sequence of characters and escape groups that specify the keys to press.

Remarks

Each key is represented by a single character or an escape group. To specify a single keyboard character, use the character itself (e.g. use "aBc" to press the keys A, B+Shift, and C after another). Only the '{' character has a special meaning and needs to be escaped by preceding it with another '{' (specify "{{" to issue a '{' key press).

Escape groups, signaled by braces "{}", may be used to produce a key action with any of the keys specified by the Keys enumeration. "{Z}" means that the 'z' key should be pressed, and "{return}" or "{enter}" that the Return key is to be pressed.

Additionally, in an escape group you can specify a modifier that determines whether the key should be hold down (e.g. {CONTROL down}), released (e.g. {shift up}), or pressed a number of times (e.g. {z 3}). In an escape group, key name and modifier must be separated by a single shift character.

The keys A to Z set the key modifiers (ALT, CTRL, SHIFT) and in particular the shift key depending on their case, even if used in an escape group. If these keys should not modify the shift key state, wrap them into an escape group and add "key" to the character, e.g. "{Rkey}" to press the R key without changing the shift key state.

When invoked on mobile elements, this method only supports the special keys {BACK} and {MENU}.

PressKeys(string, Duration)

Tries to set focus to the adapter and then presses the keys specified by sequence.

public void PressKeys(string sequence, Duration keyPressTime)

Parameters

sequence string

A sequence of characters and escape groups that specify the keys to press.

keyPressTime Duration

The key press time.

Remarks

Each key is represented by a single character or an escape group. To specify a single keyboard character, use the character itself (e.g. use "aBc" to press the keys A, B+Shift, and C after another). Only the '{' character has a special meaning and needs to be escaped by preceding it with another '{' (specify "{{" to issue a '{' key press).

Escape groups, signaled by braces "{}", may be used to produce a key action with any of the keys specified by the Keys enumeration. "{Z}" means that the 'z' key should be pressed, and "{return}" or "{enter}" that the Return key is to be pressed.

Additionally, in an escape group you can specify a modifier that determines whether the key should be hold down (e.g. {CONTROL down}), released (e.g. {shift up}), or pressed a number of times (e.g. {z 3}). In an escape group, key name and modifier must be separated by a single shift character.

The keys A to Z set the key modifiers (ALT, CTRL, SHIFT) and in particular the shift key depending on their case, even if used in an escape group. If these keys should not modify the shift key state, wrap them into an escape group and add "key" to the character, e.g. "{Rkey}" to press the R key without changing the shift key state.

When invoked on mobile elements, this method only supports the special keys {BACK} and {MENU}.

Swipe(GestureDirection, Distance)

Performs a 'Swipe' operation that starts on the center point of the element with a specific direction.

public void Swipe(GestureDirection direction, Distance distance)

Parameters

direction GestureDirection

The direction of the swipe.

distance Distance

The distance to swipe.

Exceptions

ArgumentException

Distance is negative.

Swipe(Location, GestureDirection, Distance, Duration, int)

Performs a 'Swipe' operations that starts at the point of the element specified by location.

public void Swipe(Location startLocation, GestureDirection direction, Distance distance, Duration swipeDuration, int steps)

Parameters

startLocation Location

The location where the swipe should start.

direction GestureDirection

The direction of the swipe.

distance Distance

The distance to swipe. For custom rotations the values is not pixel exact and will likely get rounded. The rounding is dependent of the technology the swipe is executed on.

swipeDuration Duration

The duration in that the swipe should get performed.

steps int

How many steps the swipe shall have. A step is one distinct move event on the target technology. The default is '0', this means the target technology determines how many steps are made by applying custom heuristics. A step count of one will produce the event sequence 1x pointer down, 1x pointer move and 1x pointer up. A step count of two will produce the event sequence 1x pointer down, 2x pointer move and 1x pointer up.

Exceptions

ArgumentNullException

When startLocation is null.

ArgumentOutOfRangeException

Steps is negative.

ArgumentOutOfRangeException

Distance is negative.

SwipeWithoutBoundsCheck(Location, GestureDirection, Distance, Duration, int)

Performs a 'Swipe' operations that starts at the point of the element specified by location, without reporting a warning if the location is outside the element.

public void SwipeWithoutBoundsCheck(Location startLocation, GestureDirection direction, Distance distance, Duration swipeDuration, int steps)

Parameters

startLocation Location

The location where the swipe should start.

direction GestureDirection

The direction of the swipe.

distance Distance

The distance to swipe. For custom rotations the values is not pixel exact and will likely get rounded. The rounding is dependent of the technology the swipe is executed on.

swipeDuration Duration

The duration in that the swipe should get performed.

steps int

How many steps the swipe shall have. A step is one distinct move event on the target technology. The default is '0', this means the target technology determines how many steps are made by applying custom heuristics. A step count of one will produce the event sequence 1x pointer down, 1x pointer move and 1x pointer up. A step count of two will produce the event sequence 1x pointer down, 2x pointer move and 1x pointer up.

Exceptions

ArgumentNullException

When startLocation is null.

ArgumentOutOfRangeException

Steps is negative.

ArgumentOutOfRangeException

Distance is negative.

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

Touch()

Performs a touch action on the adapter.

public void Touch()

Remarks

If this method is invoked on a local element, Click() will be called internally.

Touch(Duration)

Performs a touch action on the adapter.

public void Touch(Duration touchDuration)

Parameters

touchDuration Duration

The duration between the down and up phase of the touch.

Remarks

If this method is invoked on a local element, Click() will be called internally.

Touch(Location)

Performs a touch action on the adapter.

public void Touch(Location location)

Parameters

location Location

The location to touch at.

Touch(Location, Duration)

Performs a touch action on the adapter.

public void Touch(Location location, Duration touchDuration)

Parameters

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

Touch(double, double)

Performs a touch action on the adapter with the specified location.

public void Touch(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed the element.

Touch(double, double, Duration)

Performs a touch action on the adapter with the specified location.

public void Touch(double x, double y, Duration touchDuration)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed the element.

touchDuration Duration

The duration between the down and up phase of the touch.

Touch(int, Location, Duration)

Performs a touch action on the adapter.

public void Touch(int pointer, Location location, Duration touchDuration)

Parameters

pointer int

The pointer identifier to use, with zero being the default pointer.

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

Touch(int, int)

Performs a touch action on the adapter with the specified location.

public void Touch(int x, int y)

Parameters

x int

X-Coordinate to touch within the element rectangle in pixels. If the value is greater than the width of the element the click will be performed outside the element.

y int

Y-Coordinate to touch within the element rectangle in pixels. If the value is greater than the height of the element the click will be performed outside the element.

Touch(int, int, Duration)

Performs a touch action on the adapter with the specified location.

public void Touch(int x, int y, Duration touchDuration)

Parameters

x int

X-Coordinate to touch within the element rectangle in pixels. If the value is greater than the width of the element the click will be performed outside the element.

y int

Y-Coordinate to touch within the element rectangle in pixels. If the value is greater than the height of the element the click will be performed outside the element.

touchDuration Duration

The duration between the down and up phase of the touch.

TouchEnd(Location)

Finishes a multi touch operation on the adapter. TouchStart(Location)

public void TouchEnd(Location location)

Parameters

location Location

The location to touch at.

TouchEnd(Location, Duration)

Finishes a multi touch operation on the adapter. TouchStart(Location)

public void TouchEnd(Location location, Duration moveTime)

Parameters

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchEnd(double, double)

Finishes a multi touch operation on the adapter. TouchStart(Location)

public void TouchEnd(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchEnd(int, Location)

Finishes a multi touch operation on the adapter. TouchStart(int, Location)

public void TouchEnd(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchEnd(int, Location, Duration)

Finishes a multi touch operation on the adapter. TouchStart(int, Location)

public void TouchEnd(int pointerId, Location location, Duration moveTime)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchEnd(int, int)

Finishes a multi touch operation on the adapter. TouchStart(double, double)

public void TouchEnd(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchEndWithoutBoundsCheck(Location)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(Location)

public void TouchEndWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

TouchEndWithoutBoundsCheck(Location, Duration)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(Location)

public void TouchEndWithoutBoundsCheck(Location location, Duration moveTime)

Parameters

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchEndWithoutBoundsCheck(double, double)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(Location)

public void TouchEndWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchEndWithoutBoundsCheck(int, Location)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(int, Location)

public void TouchEndWithoutBoundsCheck(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchEndWithoutBoundsCheck(int, Location, Duration)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(int, Location)

public void TouchEndWithoutBoundsCheck(int pointerId, Location location, Duration moveTime)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchEndWithoutBoundsCheck(int, int)

Finishes a multi touch operation on the adapter, without reporting a warning if the location is outside the element. TouchStart(double, double)

public void TouchEndWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchMove(Location)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(Location)

public void TouchMove(Location location)

Parameters

location Location

The location to touch at.

TouchMove(Location, Duration)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(Location)

public void TouchMove(Location location, Duration moveTime)

Parameters

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchMove(double, double)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(double, double)

public void TouchMove(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchMove(double, double, Duration)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(double, double)

public void TouchMove(double x, double y, Duration moveTime)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

moveTime Duration

The timespan between the first and the second position update of the event.

TouchMove(int, Location)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, Location)

public void TouchMove(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchMove(int, Location, Duration)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, Location)

public void TouchMove(int pointerId, Location location, Duration moveTime)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchMove(int, int)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, int)

public void TouchMove(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchMove(int, int, Duration)

Performs a touch move action on the adapter. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, int)

public void TouchMove(int x, int y, Duration moveTime)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

moveTime Duration

The timespan between the first and the second position update of the event.

TouchMoveWithoutBoundsCheck(Location)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(Location)

public void TouchMoveWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

TouchMoveWithoutBoundsCheck(Location, Duration)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(Location)

public void TouchMoveWithoutBoundsCheck(Location location, Duration moveTime)

Parameters

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchMoveWithoutBoundsCheck(double, double)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(double, double)

public void TouchMoveWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchMoveWithoutBoundsCheck(double, double, Duration)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(double, double)

public void TouchMoveWithoutBoundsCheck(double x, double y, Duration moveTime)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

moveTime Duration

The timespan between the first and the second position update of the event.

TouchMoveWithoutBoundsCheck(int, Location)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, Location)

public void TouchMoveWithoutBoundsCheck(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchMoveWithoutBoundsCheck(int, Location, Duration)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, Location)

public void TouchMoveWithoutBoundsCheck(int pointerId, Location location, Duration moveTime)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

moveTime Duration

The time it takes to move the cursor to the target point.

TouchMoveWithoutBoundsCheck(int, int)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, int)

public void TouchMoveWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchMoveWithoutBoundsCheck(int, int, Duration)

Performs a touch move action on the adapter, without reporting a warning if the location is outside the element. This adds a move to the specified location with finger/mouse pressed. TouchStart(int, int)

public void TouchMoveWithoutBoundsCheck(int x, int y, Duration moveTime)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

moveTime Duration

The timespan between the first and the second position update of the event.

TouchStart(Location)

Performs a touch start action on the adapter.

public void TouchStart(Location location)

Parameters

location Location

The location to touch at.

TouchStart(double, double)

Begins a multi touch operation on the adapter. Multi touch operations can be used to compose more complex touch gestures. E.g. a swipe from left to right could be composed in the following way:

adapter.TouchStart(Location.Left);
adapter.TouchEnd(Location.Right);

Useful multitouch operations always have the form

  • 1 TouchStart
  • 0-N TouchMove
  • 1 TouchEnd
public void TouchStart(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchStart(int, Location)

Performs a touch start action on the adapter.

public void TouchStart(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchStart(int, int)

Begins a multi touch operation on the adapter. Multi touch operations can be used to compose more complex touch gestures. E.g. a swipe from left to right could be composed in the following way:

adapter.TouchStart(Location.Left);
adapter.TouchEnd(Location.Right);

Useful multitouch operations always have the form

  • 1 TouchStart
  • 0-N TouchMove
  • 1 TouchEnd
public void TouchStart(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchStartWithoutBoundsCheck(Location)

Performs a touch start action on the adapter, without reporting a warning if the location is outside the element.

public void TouchStartWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

TouchStartWithoutBoundsCheck(double, double)

Begins a multi touch operation on the adapter, without reporting a warning if the location is outside the element. Multi touch operations can be used to compose more complex touch gestures. E.g. a swipe from left to right could be composed in the following way:

adapter.TouchStart(Location.Left);
adapter.TouchEnd(Location.Right);

Useful multitouch operations always have the form

  • 1 TouchStart
  • 0-N TouchMove
  • 1 TouchEnd
public void TouchStartWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the click will be performed the element.

TouchStartWithoutBoundsCheck(int, Location)

Performs a touch start action on the adapter, without reporting a warning if the location is outside the element.

public void TouchStartWithoutBoundsCheck(int pointerId, Location location)

Parameters

pointerId int

The pointer id to use.

location Location

The location to touch at.

TouchStartWithoutBoundsCheck(int, int)

Begins a multi touch operation on the adapter, without reporting a warning if the location is outside the element. Multi touch operations can be used to compose more complex touch gestures. E.g. a swipe from left to right could be composed in the following way:

adapter.TouchStart(Location.Left);
adapter.TouchEnd(Location.Right);

Useful multitouch operations always have the form

  • 1 TouchStart
  • 0-N TouchMove
  • 1 TouchEnd
public void TouchStartWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to click within the element rectangle in pixels. If the value is greater than the width of the element the touch will be performed outside the element.

y int

Y-Coordinate to click within the element rectangle in pixels. If the value is greater than the height of the element the touch will be performed outside the element.

TouchWithoutBoundsCheck(Location)

Performs a touch action on the adapter, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(Location location)

Parameters

location Location

The location to touch at.

TouchWithoutBoundsCheck(Location, Duration)

Performs a touch action on the adapter, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(Location location, Duration touchDuration)

Parameters

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

TouchWithoutBoundsCheck(double, double)

Performs a touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(double x, double y)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed the element.

TouchWithoutBoundsCheck(double, double, Duration)

Performs a touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(double x, double y, Duration touchDuration)

Parameters

x double

X-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed outside the element.

y double

Y-Coordinate to click within the element rectangle as percentage (1.0 = 100%). If the value is greater than 1.0 the touch will be performed the element.

touchDuration Duration

The duration between the down and up phase of the touch.

TouchWithoutBoundsCheck(int, Location, Duration)

Performs a touch action on the adapter, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(int pointer, Location location, Duration touchDuration)

Parameters

pointer int

The pointer identifier to use, with zero being the default pointer.

location Location

The location to touch at.

touchDuration Duration

The duration between the down and up phase of the touch.

TouchWithoutBoundsCheck(int, int)

Performs a touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(int x, int y)

Parameters

x int

X-Coordinate to touch within the element rectangle in pixels. If the value is greater than the width of the element the click will be performed outside the element.

y int

Y-Coordinate to touch within the element rectangle in pixels. If the value is greater than the height of the element the click will be performed outside the element.

TouchWithoutBoundsCheck(int, int, Duration)

Performs a touch action on the adapter with the specified location, without reporting a warning if the location is outside the element.

public void TouchWithoutBoundsCheck(int x, int y, Duration touchDuration)

Parameters

x int

X-Coordinate to touch within the element rectangle in pixels. If the value is greater than the width of the element the click will be performed outside the element.

y int

Y-Coordinate to touch within the element rectangle in pixels. If the value is greater than the height of the element the click will be performed outside the element.

touchDuration Duration

The duration between the down and up phase of the touch.

TryCreate(Type, Element, out Adapter)

Tries to construct an adapter of a specific type for a given element.

public static bool TryCreate(Type adapterType, Element element, out Adapter adapter)

Parameters

adapterType Type

The type of adapter to construct.

element Element

The element associated with the adapter.

adapter Adapter

When this method returns, the created adapter instance, if it could be created; otherwise a null reference.

Returns

bool

true if an adapter was successfully created, otherwise false.

TryCreate<T>(Element, out T)

Tries to construct an adapter of a specific type for a given element.

public static bool TryCreate<T>(Element element, out T adapter) where T : Adapter

Parameters

element Element

The element associated with the adapter.

adapter T

When this method returns, the created adapter instance, if it could be created; otherwise a null reference.

Returns

bool

true if an adapter was successfully created, otherwise false.

Type Parameters

T

The type of adapter to construct. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

TryFindSingle(RxPath, out Element)

Tries to apply a Ranorex Path to the adapter, returning an Element.

public bool TryFindSingle(RxPath path, out Element foundElement)

Parameters

path RxPath

The RxPath to apply.

foundElement Element

The first element found or null if no element is found.

Returns

bool

True if an element is found for the specified path, otherwise false.

TryFindSingle(RxPath, Duration, out Element)

Tries to apply a Ranorex Path to the adapter, returning an Element.

public bool TryFindSingle(RxPath path, Duration timeout, out Element foundElement)

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for the element.

foundElement Element

The first element found or null if no element is found within the timeout.

Returns

bool

True if an element is found for the specified path within the specified timeout, otherwise false.

TryFindSingle<T>(RxPath, Duration, out T)

Tries to apply a Ranorex Path to the adapter, returning a specific adapter type (e.g. Role or Capability).

public bool TryFindSingle<T>(RxPath path, Duration timeout, out T foundAdapter) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

timeout Duration

The time to keep looking for the element.

foundAdapter T

The first element found converted to the specified adapter type or null if no element is found within the timeout or the element does not support the capabilities to create the specified adapter type.

Returns

bool

True if an element is found for the specified path within the specified timeout and the specified adapter type could be created, otherwise false.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

TryFindSingle<T>(RxPath, out T)

Tries to apply a Ranorex Path to the adapter, returning a specific adapter type (e.g. Role or Capability).

public bool TryFindSingle<T>(RxPath path, out T foundAdapter) where T : Adapter

Parameters

path RxPath

The RxPath to apply.

foundAdapter T

The first element found converted to the specified adapter type or null if no element is found or the element does not support the capabilities to create the specified adapter type.

Returns

bool

True if an element is found for the specified path and the specified adapter type could be created, otherwise false.

Type Parameters

T

The expected adapter type. The supplied type must inherit from Adapter, but most not be the Adapter type itself.

Operators

implicit operator Element(Adapter)

Converts the adapter to an Element by returning the underlying element.

public static implicit operator Element(Adapter adapter)

Parameters

adapter Adapter

The adapter to convert to an element.

Returns

Element

The element corresponding to the adapter.