Package FlaNium.WinAPI.actions
Class TouchActions
- java.lang.Object
-
- FlaNium.WinAPI.actions.TouchActions
-
public class TouchActions extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTouchActions.StartEndPoint
-
Constructor Summary
Constructors Constructor Description TouchActions(DesktopElement desktopElement)TouchActions(DesktopElement desktopElement, int x, int y)TouchActions(FlaNiumDriver driver)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddrag(Integer duration, TouchActions.StartEndPoint[] startEndPoints, Integer durationHold)Performs a touch-drag from the start point to the end point.voidhold(Integer duration, org.openqa.selenium.Point[] points)Holds the touch on the given points for the given duration.voidpinch(org.openqa.selenium.Point center, double startRadius, double endRadius, Integer duration, double angle)Performs a pinch with two fingers.voidrotate(org.openqa.selenium.Point center, double radius, double startAngle, double endAngle, Integer duration)Performs a 2-finger rotation around the given point where the first finger is at the center and the second is rotated around.voidtap(org.openqa.selenium.Point[] points)Performs a tap on the given point or points.voidtransition(Integer duration, TouchActions.StartEndPoint[] startEndPoints)Transitions all the points from the start point to the end points.
-
-
-
Constructor Detail
-
TouchActions
public TouchActions(FlaNiumDriver driver)
-
TouchActions
public TouchActions(DesktopElement desktopElement, int x, int y)
-
TouchActions
public TouchActions(DesktopElement desktopElement)
-
-
Method Detail
-
tap
public void tap(org.openqa.selenium.Point[] points)
Performs a tap on the given point or points.- Parameters:
points-
-
hold
public void hold(Integer duration, org.openqa.selenium.Point[] points)
Holds the touch on the given points for the given duration.- Parameters:
duration- The duration of the hold (in milliseconds).points- The points that should be hold down.
-
pinch
public void pinch(org.openqa.selenium.Point center, double startRadius, double endRadius, Integer duration, double angle)Performs a pinch with two fingers.- Parameters:
center- The center point of the pinch.startRadius- The starting radius.endRadius- The end radius.duration- The duration of the action (in milliseconds).angle- The angle of the two points, relative to the x-axis.
-
transition
public void transition(Integer duration, TouchActions.StartEndPoint[] startEndPoints)
Transitions all the points from the start point to the end points.- Parameters:
duration- The duration for the action (in milliseconds).startEndPoints- The list of start/end point tuples.
-
drag
public void drag(Integer duration, TouchActions.StartEndPoint[] startEndPoints, Integer durationHold)
Performs a touch-drag from the start point to the end point.- Parameters:
duration- The duration of the action (in milliseconds).startEndPoints- The list of start/end point tuples.durationHold- The duration of the hold on start points (in milliseconds).
-
rotate
public void rotate(org.openqa.selenium.Point center, double radius, double startAngle, double endAngle, Integer duration)Performs a 2-finger rotation around the given point where the first finger is at the center and the second is rotated around.- Parameters:
center- The center point of the rotation.radius- The radius of the rotation.startAngle- The starting angle (in rad).endAngle- The ending angle (in rad).duration- The total duration for the transition (in milliseconds).
-
-