Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pause Action Not Working in Pointer Action Sequence #936

Open
myungkyojung opened this issue Aug 28, 2024 · 4 comments
Open

pause Action Not Working in Pointer Action Sequence #936

myungkyojung opened this issue Aug 28, 2024 · 4 comments

Comments

@myungkyojung
Copy link

myungkyojung commented Aug 28, 2024

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"}
]
}
]

@KazuCocoa
Copy link
Member

appium/appium#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.

@danyatuna
Copy link

danyatuna commented Nov 11, 2024

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

@Linloir
Copy link

Linloir commented Nov 21, 2024

Adding another {"type":"pointerMove", "x":100,"y":100}, after the {"type":"pause", "duration": 200}, fix this kinda problem

@danyatuna
Copy link

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 :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants