You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: WebDriverAgentLib/Categories/XCUIApplication+FBTouchAction.h
-37
Original file line number
Diff line number
Diff line change
@@ -15,43 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
15
15
16
16
@interfaceXCUIApplication (FBTouchAction)
17
17
18
-
/**
19
-
Perform complex touch action in scope of the current application.
20
-
Touch actions are represented as lists of dictionaries with predefined sets of values and keys.
21
-
Each dictionary must contain 'action' key, which is one of the following:
22
-
- 'tap' to perform a single tap
23
-
- 'longPress' to perform long tap
24
-
- 'press' to perform press
25
-
- 'release' to release the finger
26
-
- 'moveTo' to move the virtual finger
27
-
- 'wait' to modify the duration of the preceeding action
28
-
- 'cancel' to cancel the preceeding action in the chain
29
-
Each dictionary can also contain 'options' key with additional parameters dictionary related to the appropriate action.
30
-
31
-
The following options are mandatory for 'tap', 'longPress', 'press' and 'moveTo' actions:
32
-
- 'x' the X coordinate of the action
33
-
- 'y' the Y coordinate of the action
34
-
- 'element' the corresponding element instance, for which the action is going to be performed
35
-
If only 'element' is set then hit point coordinates of this element will be used.
36
-
If only 'x' and 'y' are set then these will be considered as absolute coordinates.
37
-
If both 'element' and 'x'/'y' are set then these will act as relative element coordinates.
38
-
39
-
It is also mandatory, that 'release' and 'wait' actions are preceeded with at least one chain item, which contains absolute coordinates, like 'tap', 'press' or 'longPress'. Empty chains are not allowed.
40
-
41
-
The following additional options are available for different actions:
42
-
- 'tap': 'count' (defines count of taps to be performed in a row; 1 by default)
43
-
- 'longPress': 'duration' (number of milliseconds to hold/move the virtual finger; 500.0 ms by default)
44
-
- 'wait': 'ms' (number of milliseconds to wait for the preceeding action; 0.0 ms by default)
45
-
46
-
List of lists can be passed there is order to perform multi-finger touch action. Each single actions chain is going to be executed by a separate virtual finger in such case.
47
-
48
-
@param actions Either array of dictionaries, whose format is described above to peform single-finger touch action or array of array to perform multi-finger touch action.
49
-
@param elementCache Cached elements mapping for the currrent application. The method assumes all elements are already represented by their actual instances if nil value is set
50
-
@param error If there is an error, upon return contains an NSError object that describes the problem
51
-
@return YES If the touch action has been successfully performed without errors
0 commit comments