pause Action Not Working in Pointer Action Sequence
I wrote a W3C action to perform a double-tap gesture, but I've encountered an issue where the action {"type":"pause", "duration": 200} doesn't seem to work as expected. The rest of the sequence executes correctly, but this specific pause doesn't have any effect. Could you help me understand why this is happening and how to fix it?
{ "actions":[ { "type":"pointer", "id":"finger1", "parameters":{"pointerType":"touch"}, "actions":[ {"type":"pointerMove", "x":100,"y":100}, {"type":"pointerDown"}, {"type":"pause", "duration": 50}, {"type":"pointerUp"}, {"type":"pause", "duration": 200}, {"type":"pointerDown"}, {"type":"pause", "duration": 50}, {"type":"pointerUp"} ] } ]
https://github.com/appium/appium/issues/16583 could be duplicated. In sort, it might be difficult to fix with low-level XCTest APIs. https://appium.github.io/appium-xcuitest-driver/latest/guides/gestures/ also would help.
Having the same problem, pause (no matter how long the duration is) seems to be ignored Used to work around this issue by using WDIO's touchAction method (https://webdriver.io/docs/api/browser/touchAction/) (I'm not sure how it's implemented internally), but now it's deprecated
For now it seems the only solution is to send 2 separate requests and pausing between them. But it's bad because there's no control over how long the requests will take, so precise actions are not possible with this workaround.
Gestures listed here https://appium.github.io/appium-xcuitest-driver/latest/guides/gestures/ do help too, but they're very limited compared to W3C Actions
Adding another {"type":"pointerMove", "x":100,"y":100}, after the {"type":"pause", "duration": 200}, fix this kinda problem
Sadly it didn't help, here's is the action I've tried - double tap with a 1.5 sec pause between taps:
await driver.performActions([
{
"type": "pointer",
"id": "finger1",
"parameters": {"pointerType": "touch"},
"actions": [
{"type": "pointerMove", "duration": 0, "x": coordinates.x, "y": coordinates.y},
{"type": "pointerDown", "button": 0},
{"type": "pause", "duration": 10},
{"type": "pointerMove", "x": coordinates.x, "y": coordinates.y},
{"type": "pointerUp", "button": 0},
{"type": "pause", "duration": 1500},
{"type": "pointerMove", "x": coordinates.x, "y": coordinates.y},
{"type": "pointerDown", "button": 0},
{"type": "pause", "duration": 10},
{"type": "pointerMove", "x": coordinates.x, "y": coordinates.y},
{"type": "pointerUp", "button": 0}
]
}
]
)
The action is still clumped into something that looks like a single tap :(
Try changing {"type": "pause", "duration": 10}, to {"type": "pointerMove", "duration": 10, "x": x, "y": y}