Skip to content

TouchAction fails to complete with more than one waitAction #401

Closed

Description

@sergeyhizhnyak

Appium 1.5.2
Java client 4.0.0
IOS

I'm trying to do the following:

TouchAction touchAction = new TouchAction(driver);
final int dragDelay = 1000;

touchAction.tap(element1).waitAction(dragDelay);
touchAction.moveTo(element2).waitAction(dragDelay);
touchAction.moveTo(endX, endY).waitAction(dragDelay).release();
touchAction.perform();

On the second waitAction execution just stops and further commands are just ignored

Activity

  1. imurchie commented on Jun 3, 2016

    @imurchie
    Contributor

    Can you provide the Appium server logs so we can see what is going on?

  2. sergeyhizhnyak commented on Jun 3, 2016

    @sergeyhizhnyak
    Author

    2016-06-03 14:53:41:887 - [HTTP] --> POST /wd/hub/session/df2a2257-8878-4b0f-8b98-6a3fb002b29f/touch/perform {"actions":[{"action":"longPress","options":{"x":496,"y":139}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":-209,"y":-97}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":209,"y":502}},{"action":"wait","options":{"ms":5000}},{"action":"release","options":{}}]}

    2016-06-03 14:53:41:887 - [MJSONWP] Calling AppiumDriver.performTouch() with args: [[{"action":"longPress","options":{"x":496,"y":139}},{"action":"wait","options":{"ms":1000}},{"action":"moveTo","options":{"x":-209,"y":-97}},{"act...
    2016-06-03 14:53:41:888 - [debug] [iOS] Executing iOS command 'performTouch'

    2016-06-03 14:53:41:888 - [debug] [UIAuto] Sending command to instruments: target.touch([{"touch":[{"x":496,"y":139}],"time":0.2},{"touch":[{"x":496,"y":139}],"time":1.2},{"touch":[{"x":287,"y":42}],"time":1.4},{"touch":[{"x":287,"y":42}],"time":2.4},{"touch":[{"x":496,"y":544}],"time":2.6},{"touch":[{"x":496,"y":544}],"time":7.6}])

    2016-06-03 14:53:42:002 - [debug] [Instruments] [INST] 2016-06-03 14:53:41 +0000 Debug: Got new command 171 from instruments: target.touch([{"touch":[{"x":496,"y":139}],"time":0.2},{"touch":[{"x":496,"y":139}],"time":1.2},{"touch":[{"x":287,"y":42}],"time":1.4},{"touch":[{"x":287,"y":42}],"time":2.4},{"touch":[{"x":496,"y":544}],"time":2.6},{"touch":[{"x":496,"y":544}],"time":7.6}])

    2016-06-03 14:53:42:022 - [debug] [Instruments] [INST] 2016-06-03 14:53:41 +0000 Debug: evaluating target.touch([{"touch":[{"x":496,"y":139}],"time":0.2},{"touch":[{"x":496,"y":139}],"time":1.2},{"touch":[{"x":287,"y":42}],"time":1.4},{"touch":[{"x":287,"y":42}],"time":2.4},{"touch":[{"x":496,"y":544}],"time":2.6},{"touch":[{"x":496,"y":544}],"time":7.6}])

    2016-06-03 14:53:42:041 - [debug] [Instruments] [INST] 2016-06-03 14:53:41 +0000 Debug: target.touch(__NSCFArray)

    2016-06-03 14:53:49:727 - [debug] [Instruments] [INST] 2016-06-03 14:53:49 +0000 Debug: evaluation finished

    2016-06-03 14:53:49:758 - [debug] [Instruments] [INST] 2016-06-03 14:53:49 +0000 Debug: responding with:

    2016-06-03 14:53:49:775 - [debug] [UIAuto] Socket data received (25 bytes)

    2016-06-03 14:53:49:776 - [debug] [UIAuto] Got result from instruments: {"status":0,"value":""}
    2016-06-03 14:53:49:777 - [MJSONWP] Responding to client with driver.performTouch() result: null
    2016-06-03 14:53:49:778 - [HTTP] <-- POST /wd/hub/session/df2a2257-8878-4b0f-8b98-6a3fb002b29f/touch/perform 200 7891 ms - 76

    2016-06-03 14:53:49:787 - [debug] [Instruments] [INST] 2016-06-03 14:53:49 +0000 Debug: Running system command #172: /Applications/Appium.app/Contents/Resources/node/bin/node /Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/appium-ios-driver/node_modules/appium-uiauto/build/lib/bin/command-proxy-client.js /var/folders/ng/2xx6jlt530g5f0y4rzhw9m0h0000gn/T/instruments_sock 2,{"status":0,"v...

  3. sergeyhizhnyak commented on Jun 14, 2016

    @sergeyhizhnyak
    Author

    Some more info: it doesn't work when all the wait actions has same wait time, e.g:
    touchAction.tap(element1).waitAction(dragDelay);
    touchAction.moveTo(element2).waitAction(dragDelay);
    touchAction.moveTo(endX, endY).waitAction(dragDelay).release();
    touchAction.perform();

    However if delays will decrease from first to last wait action - it is going to work:
    touchAction.tap(element1).waitAction(dragDelay * 3);
    touchAction.moveTo(element2).waitAction(dragDelay * 2);
    touchAction.moveTo(endX, endY).waitAction(dragDelay).release();
    touchAction.perform();

  4. SrinivasanTarget commented on Jun 24, 2017

    @SrinivasanTarget
    Member

    There are plenty of improvements around this space later. so closing this coz of inactivity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions