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

touch actions are not wokring in 1.5.3 release #12

Open
npradeepkb opened this issue Aug 9, 2016 · 8 comments
Open

touch actions are not wokring in 1.5.3 release #12

npradeepkb opened this issue Aug 9, 2016 · 8 comments

Comments

@npradeepkb
Copy link

Now none of the touch actions are not working like, tap , press, moveTo

@imurchie
Copy link

imurchie commented Aug 9, 2016

Can you be more specific about "not working"? What happens? Output from the client? Output on the server?

@npradeepkb
Copy link
Author

Will capture more logs tomorrow and provide,
But "mobile: tap" option to execute_script method is no more supported.

@imurchie
Copy link

imurchie commented Aug 9, 2016

Yes, mobile: tap is not supported.

@npradeepkb
Copy link
Author

npradeepkb commented Aug 9, 2016

Message should be send like this, how to do that.
{"sessionId":"719858c1-3cb6-49aa-a508-eb93229d570d","actions":[{"action":"tap","options":{"y":10,"x":100,"count":1,"element":"1"}}]}

can i replace execute_script with _execute_command with parameters

Please help me i will create a patch.

@gempesaw
Copy link
Member

can i replace execute_script with _execute_command with parameters

Hm, unfortunately, I think it's slightly more complicated than that, there's not an existing command for making the actions call like that yet. So, this would entail:

  1. adding the appropriate endpoint in Commands.pm
  2. creating a subroutine in Appium.pm that accepts parameters and references the above endpoint
  3. in TouchActions, update the handles for the driver attr with the subroutine name from step 2
  4. fix tap in TouchActions.pm to call the subroutine that you add from Appium.pm

Let me know if any of this is confusing or needs clarification. And, thanks for finding this bug!

@npradeepkb
Copy link
Author

I have fixed for press, longPress, wait, swipe, relase, drag and drop,
Please let me know which branch i will checkin.

usage for swipe

$appium->swipe(600,200,100,200,1000)->perform();

in TouchActions.pm
return $self->press($coords[0], $coords[1])->wait($coords[4])->moveTo($coords[2], $coords[3])->release();

@gempesaw
Copy link
Member

Oh, great!

Please let me know which branch i will checkin.

You should fork the repository and open a PR and name the branch after the changes you're making. update-touch-actions would be fine, or whatever you'd like.

Did you/would you also add the relevant tests for the code you're adding? Thanks so much!

@npradeepkb
Copy link
Author

Please review the pull request and let me know.

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

3 participants