Wakaran
Wakaran

Reputation: 91

Android monkeyrunner - drag method from MonkeyDevice does long-press instead of screen flicking

The drag method from Monkeyrunner always does the long-press incorrectly instead of the screen flicking/swiping.

device.drag((762,1796),(341,1796), 0.01, 50)

Is there a way to workaround this issue without disabling long-press in the test app itself?

Upvotes: 2

Views: 835

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69208

It depends on the device, but if you are getting a long-press instead of drag try increasing the number of steps and duration, for example:

device.drag((762,1796),(341,1796), 0.5, 50)

Upvotes: 1

Related Questions