Class Touch
- Namespace
- Ranorex
- Assembly
- Ranorex.Core.dll
Provides touch input actions.
public class Touch
- Inheritance
-
Touch
- Inherited Members
Constructors
Touch()
public Touch()
Properties
HasActivePointers
Gets a value indicating whether the touch input state has active (in contact) pointers.
public static bool HasActivePointers { get; }
Property Value
- bool
trueif the touch input state has active pointers; otherwise,false.
IsSupported
Gets a value indicating whether touch input is supported on this system.
public static bool IsSupported { get; }
Property Value
- bool
trueif touch input is supported; otherwise,false.
Methods
DoubleTap(Element)
Performs a double tap action on the adapter.
public static void DoubleTap(Element element)
Parameters
elementElementThe element to perform the Touch action on.
DoubleTap(Element, double, double)
Performs a double tap action on the adapter with the specified location.
public static void DoubleTap(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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(Element, int, Location)
Performs a double tap action on the adapter with the specified location.
public static void DoubleTap(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Double Tap action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
DoubleTap(Element, int, int)
Performs a double tap action on the adapter with the specified location.
public static void DoubleTap(Element element, int x, int y)
Parameters
elementElementThe element to perform the Double Tap action on.
xintX-Coordinate to tap 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.
yintY-Coordinate to tap 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(Element)
Performs a long touch action on the adapter.
public static void LongTouch(Element element)
Parameters
elementElementThe element to perform the Touch action on.
LongTouch(Element, Duration)
Performs a long touch action on the adapter.
public static void LongTouch(Element element, Duration longTouchDuration)
Parameters
elementElementThe element to perform the Touch action on.
longTouchDurationDurationThe timespan between the down and up event of the touch.
LongTouch(Element, double, double)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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(Element, double, double, Duration)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, double x, double y, Duration longTouchDuration)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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.
longTouchDurationDurationThe timespan between the down and up event of the touch.
LongTouch(Element, int, Location)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
LongTouch(Element, int, Location, Duration)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, int pointer, Location location, Duration longTouchDuration)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
longTouchDurationDurationThe timespan between the down and up event of the touch.
LongTouch(Element, int, int)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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(Element, int, int, Duration)
Performs a long touch action on the adapter with the specified location.
public static void LongTouch(Element element, int x, int y, Duration longTouchDuration)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
longTouchDurationDurationThe timespan between the down and up event of the touch.
Reset()
Resets the current touch state, removing all active pointers.
public static void Reset()
Tap(Element)
Performs a touch action.
public static void Tap(Element element)
Parameters
elementElementThe element to perform the Touch action on.
Tap(Element, Duration)
Performs a touch action.
public static void Tap(Element element, Duration touchDuration)
Parameters
elementElementThe element to perform the Touch action on.
touchDurationDurationThe duration between the down and up phase of the touch.
Tap(Element, double, double)
Performs a touch action on the adapter with the specified location.
public static void Tap(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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.
Tap(Element, double, double, Duration)
Performs a touch action on the adapter with the specified location.
public static void Tap(Element element, double x, double y, Duration touchDuration)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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.
touchDurationDurationThe duration between the down and up phase of the touch.
Tap(Element, int, Location)
Performs a touch action on the adapter.
public static void Tap(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
Tap(Element, int, Location, Duration)
Performs a touch action on the adapter.
public static void Tap(Element element, int pointer, Location location, Duration touchDuration)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
touchDurationDurationThe duration between the down and up phase of the touch.
Tap(Element, int, int)
Performs a touch action on the adapter with the specified location.
public static void Tap(Element element, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
Tap(Element, int, int, Duration)
Performs a touch action on the adapter with the specified location.
public static void Tap(Element element, int x, int y, Duration touchDuration)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
touchDurationDurationThe duration between the down and up phase of the touch.
TouchEnd(Element, Location, Duration)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, int)
public static void TouchEnd(Element element, Location location, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
locationLocationThe location to touch at.
moveTimeDurationThe time it takes the pointer to move to the specified position.
TouchEnd(Element, double, double)
Finishes a multi touch operation on the adapter. TouchStart(Element, double, double)
public static void TouchEnd(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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(Element, int, Location)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, Location)
public static void TouchEnd(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
TouchEnd(Element, int, Location, Duration)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, Location)
public static void TouchEnd(Element element, int pointer, Location location, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
moveTimeDurationThe time it takes the pointer to move to the specified position.
TouchEnd(Element, int, double, double)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, double, double)
public static void TouchEnd(Element element, int pointer, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xdoubleX-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.
ydoubleY-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(Element, int, int)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, int)
public static void TouchEnd(Element element, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
TouchEnd(Element, int, int, int)
Finishes a multi touch operation on the adapter. TouchStart(Element, int, int, int)
public static void TouchEnd(Element element, int pointer, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xintX-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.
yintY-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(Element, Location, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, int)
public static void TouchMove(Element element, Location location, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
locationLocationThe location to touch at.
moveTimeDurationThe time it takes the pointer to move to the specified position.
TouchMove(Element, double, double)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, double, double)
public static void TouchMove(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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(Element, double, double, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, double, double)
public static void TouchMove(Element element, double x, double y, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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.
moveTimeDurationThe timespan between the first and the second position update of the event.
TouchMove(Element, int, Location)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, Location)
public static void TouchMove(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
TouchMove(Element, int, Location, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, Location)
public static void TouchMove(Element element, int pointer, Location location, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
moveTimeDurationThe timespan between the first and the second position update of the event.
TouchMove(Element, int, double, double)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, double, double)
public static void TouchMove(Element element, int pointer, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xdoubleX-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.
ydoubleY-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(Element, int, double, double, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, double, double)
public static void TouchMove(Element element, int pointer, double x, double y, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xdoubleX-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.
ydoubleY-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.
moveTimeDurationThe timespan between the first and the second position update of the event.
TouchMove(Element, int, int)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, int)
public static void TouchMove(Element element, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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(Element, int, int, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, int)
public static void TouchMove(Element element, int x, int y, Duration moveDuration)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
moveDurationDurationThe timespan between the first and the second position update of the event.
TouchMove(Element, int, int, int)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, int, int)
public static void TouchMove(Element element, int pointer, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xintX-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.
yintY-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(Element, int, int, int, Duration)
Performs a touch move action on the adapter. This adds a move to the specified location with cursor pressed. TouchStart(Element, int, int, int)
public static void TouchMove(Element element, int pointer, int x, int y, Duration moveTime)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xintX-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.
yintY-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.
moveTimeDurationThe timespan between the first and the second position update of the event.
TouchStart(Element, 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 static void TouchStart(Element element, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
xdoubleX-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.
ydoubleY-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(Element, int, Location)
Performs a touch start action on the adapter.
public static void TouchStart(Element element, int pointer, Location location)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
locationLocationThe location to touch at.
TouchStart(Element, int, 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 static void TouchStart(Element element, int pointer, double x, double y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xdoubleX-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.
ydoubleY-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(Element, 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 static void TouchStart(Element element, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
xintX-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.
yintY-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.
TouchStart(Element, int, 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 static void TouchStart(Element element, int pointer, int x, int y)
Parameters
elementElementThe element to perform the Touch action on.
pointerintThe pointer identifier to use, with zero being the default pointer.
xintX-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.
yintY-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.