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
| Type | Name | Description |
|---|---|---|
TouchData | touchData | Data 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
| Type | Name | Description |
|---|---|---|
TouchData | touchData | Data 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
| Type | Name | Description |
|---|---|---|
TouchData | touchData | Data 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
| Type | Name | Description |
|---|---|---|
TouchData | touchData | Data about touch event. |
LongTouch
Method
void LongTouch(HtmlElement he)
Swipes into the view of the HtmlElement and long-touches it.
Parameters
| Type | Name | Description |
|---|---|---|
HtmlElement | he | HtmlElement that is to be touched. |
LongTouch
Method
void LongTouch(int x, int y)
Long-touches the point that is already in the view.
Parameters
| Type | Name | Description |
|---|---|---|
int | x | X coordinate of a point relative to the top side of the view. |
int | y | Y 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
| Type | Name | Description |
|---|---|---|
HtmlElement | he | HtmlElement that is to be touched. |
Touch
Method
void Touch(HtmlElement he, int pauseMs)
Swipes into the view of the HtmlElement and touches it.
Parameters
| Type | Name | Description |
|---|---|---|
HtmlElement | he | HtmlElement that is to be touched. |
int | pauseMs | Pause 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
| Type | Name | Description |
|---|---|---|
int | x | X coordinate of a point relative to the top side of the view. |
int | y | Y 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
| Type | Name | Description |
|---|---|---|
int | x | X coordinate of a point relative to the top side of the view. |
int | y | Y coordinate of a point relative to the top side of the view. |
int | pauseMs | Pause 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
| Type | Name | Description |
|---|---|---|
HtmlElement | he | HtmlElement 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
| Type | Name | Description |
|---|---|---|
int | x | X coordinate of a point relative to the top of a window |
int | y | Y 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
| Type | Name | Description |
|---|---|---|
int | fromX | X coordinate of a starting point relative to the top side of the view. |
int | fromY | Y coordinate of a starting point relative to the top side of the view. |
int | toX | X coordinate of an ending point relative to the top side of the view. |
int | toY | Y 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
| Type | Name | Description |
|---|---|---|
int | fromX | X coordinate of a starting point relative to the top side of the view. |
int | fromY | Y coordinate of a starting point relative to the top side of the view. |
HtmlElement | heTo | HtmlElement 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
| Type | Name | Description |
|---|---|---|
HtmlElement | heFrom | HtmlElement that works as a starting point for the swipe. |
int | toX | X coordinate of a final point relative to the top side of the view. |
int | toY | Y 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
| Type | Name | Description |
|---|---|---|
SwipeDirection | swipeDirection | Direction 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
| Type | Name | Description |
|---|---|---|
TouchEmulationParameters | value | TouchEmulationParameters that are to be used in the current browser instance. |