TouchSimulation

Assembly: ZennoLab.CommandCenter
Full name: ZennoLab.CommandCenter.Tab.TouchSimulation
Kind: class


Contains methods simulating work with touch screen

Methods

TouchStart

Method

void TouchStart(TouchData touchData)

Indicates that the screen has been touched.

Touches begin with one TouchStart action followed by zero or more TouchMoved actions and finally one TouchEnded or TouchCancelled action. Events not respecting this order will be ignored.

Parameters

TypeNameDescription
TouchDatatouchDataData about touch event.

TouchEnd

Method

void TouchEnd(TouchData touchData)

Indicates that the screen no longer is touched.

Touches begin with one TouchStart action followed by zero or more TouchMoved actions and finally one TouchEnded or TouchCancelled action. Events not respecting this order will be ignored.

Parameters

TypeNameDescription
TouchDatatouchDataData about touch event.

TouchMove

Method

void TouchMove(TouchData touchData)

Indicates the swipe.

Touches begin with one TouchStart action followed by zero or more TouchMoved actions and finally one TouchEnded or TouchCancelled action. Events not respecting this order will be ignored.

Parameters

TypeNameDescription
TouchDatatouchDataData about touch event.

TouchCancel

Method

void TouchCancel(TouchData touchData)

Indicates that touch event must be cancelled.

Touches begin with one TouchStart action followed by zero or more TouchMoved actions and finally one TouchEnded or TouchCancelled action. Events not respecting this order will be ignored.

Parameters

TypeNameDescription
TouchDatatouchDataData about touch event.

LongTouch

Method

void LongTouch(HtmlElement he)

Swipes into the view of the HtmlElement and long-touches it.

Parameters

TypeNameDescription
HtmlElementheHtmlElement that is to be touched.

LongTouch

Method

void LongTouch(int x, int y)

Long-touches the point that is already in the view.

Parameters

TypeNameDescription
intxX coordinate of a point relative to the top side of the view.
intyY coordinate of a point relative to the top side of the view.

Touch

Method

void Touch(HtmlElement he)

Swipes into the view of the HtmlElement and touches it.

Parameters

TypeNameDescription
HtmlElementheHtmlElement that is to be touched.

Touch

Method

void Touch(HtmlElement he, int pauseMs)

Swipes into the view of the HtmlElement and touches it.

Parameters

TypeNameDescription
HtmlElementheHtmlElement that is to be touched.
intpauseMsPause in milliseconds between TouchStart and TouchEnd. 0 means short touch and -1 means long touch (from TouchEmulationParameters).

Touch

Method

void Touch(int x, int y)

Touches the point that is already in the view.

Parameters

TypeNameDescription
intxX coordinate of a point relative to the top side of the view.
intyY coordinate of a point relative to the top side of the view.

Touch

Method

void Touch(int x, int y, int pauseMs)

Touches the point that is already in the view.

Parameters

TypeNameDescription
intxX coordinate of a point relative to the top side of the view.
intyY coordinate of a point relative to the top side of the view.
intpauseMsPause between TouchStart and TouchEnd. 0 means short touch and -1 means long touch (from TouchEmulationParameters).

SwipeIntoView

Method

void SwipeIntoView(HtmlElement he)

Swipes into the view of the HtmlElement.

Parameters

TypeNameDescription
HtmlElementheHtmlElement that needs to get displayed.

SwipeIntoViewUsingAbsoluteCoords

Method

void SwipeIntoViewUsingAbsoluteCoords(int x, int y)

Swipes into the view of a point. Mind that coordinates for this method are relative to the top of a window. Do not call this method using coordinates, relative to the top of a view!

Parameters

TypeNameDescription
intxX coordinate of a point relative to the top of a window
intyY coordinate of a point relative to the top of a window.

SwipeBetween

Method

void SwipeBetween(int fromX, int fromY, int toX, int toY)

Performs a swipe between two points. Both points must be in a view, and the coordinates must be relative to the top of a view.

Parameters

TypeNameDescription
intfromXX coordinate of a starting point relative to the top side of the view.
intfromYY coordinate of a starting point relative to the top side of the view.
inttoXX coordinate of an ending point relative to the top side of the view.
inttoYY coordinate of an ending point relative to the top side of the view.

SwipeBetween

Method

void SwipeBetween(int fromX, int fromY, HtmlElement heTo)

Performs a swipe from a point to the HtmlElement. Both of them must be in a view, and the coordinates of a point must be relative to the top of a view.

Parameters

TypeNameDescription
intfromXX coordinate of a starting point relative to the top side of the view.
intfromYY coordinate of a starting point relative to the top side of the view.
HtmlElementheToHtmlElement that works as a ending point for the swipe.

SwipeBetween

Method

void SwipeBetween(HtmlElement heFrom, int toX, int toY)

Performs a swipe from the HtmlElement to the point. Both of them must be in a view, and the coordinates of a point must be relative to the top of a view.

Parameters

TypeNameDescription
HtmlElementheFromHtmlElement that works as a starting point for the swipe.
inttoXX coordinate of a final point relative to the top side of the view.
inttoYY coordinate of a final point relative to the top side of the view.

SwipeSimple

Method

void SwipeSimple(SwipeDirection swipeDirection)

Performs a simple swipe in one of four predefined directions.

Parameters

TypeNameDescription
SwipeDirectionswipeDirectionDirection of a swipe

GetCopyOfTouchEmulationParameters

Method

TouchEmulationParameters GetCopyOfTouchEmulationParameters()

Returns a copy of TouchEmulationParameters that are being used in the current browser instance. Mind that this is only a copy, and changes to it will not affect anything unless you call SetTouchEmulationParameters

Returns: A copy of TouchEmulationParameters that are being used in the current browser instance.

SetTouchEmulationParameters

Method

void SetTouchEmulationParameters(TouchEmulationParameters value)

Sets touch emulation parameters of the current browser instance to the value passed in it.

Parameters

TypeNameDescription
TouchEmulationParametersvalueTouchEmulationParameters that are to be used in the current browser instance.