Closed
Bug 750271
Opened 13 years ago
Closed 12 years ago
Add touch support to Marionette
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mdas, Assigned: annyang121)
References
Details
Add the selenium atoms for touch support as soon as possible, as many of the gaia tests will rely on gestures.
Comment 1•13 years ago
|
||
wlach has found a way to send touch events in android, by writing them to /dev/input. See sample program here:
http://pastebin.mozilla.org/1649403
This simulates a swipe-down event.
This might be useful in some cases if higher-level events don't always work reliably.
Reporter | ||
Comment 2•13 years ago
|
||
We can also send touch events over the adb bridge. They look like:
adb shell sendevent /dev/input/event0 0003 0 251
so we can send it from the client side.
Reporter | ||
Comment 3•13 years ago
|
||
I should add I already have code to convert gestures done on an android device into these shell commands, so we can easily capture and reuse data client-side.
Comment 4•13 years ago
|
||
(In reply to Malini Das [:mdas] from comment #3)
> I should add I already have code to convert gestures done on an android
> device into these shell commands, so we can easily capture and reuse data
> client-side.
I have found this doesn't actually work very well in practice due to the latency involved in starting the sendevent utility. A drag gesture, for example, involves many touches over a brief (< 1 sec period). Even though sendevent doesn't take particularly long to start (a few msecs on a galaxy nexus), it's long enough that you can't really simulate the original event.
In any case, I've been slowing working on developing my original example code into a more general replacement for the Monkey tool which I've been using for Eideticker. So far I have it executing basic scripts of events, but anything up-to-and-including a custom TCP/IP server protocol is possible. I'd love help and/or extra hands! :)
https://github.com/wlach/orangatun
Reporter | ||
Comment 5•12 years ago
|
||
We'll be implementing this using DOM level touch events.
Assignee: nobody → yiyang
Comment 6•12 years ago
|
||
So what's the difference to bug 809245?
Reporter | ||
Comment 7•12 years ago
|
||
bug 809245 essentially sent over a gesture library that marionette would use for the touch events. It just does an import_script(...), and adds helper methods on top of it.
This bug will actually implement the touch commands on the Marionette side so we won't rely on the outside gesture library. Some untested functions like pinch will be tested and made to work if they don't already.
Reporter | ||
Comment 8•12 years ago
|
||
Also, we shouldn't neglect that we shouldn't be able to act on hidden elements. We should always check that an element is displayed before sending events to it.
Reporter | ||
Comment 9•12 years ago
|
||
This was meant to be a tracking bug, but now that we have action chains and the like, we can close this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•2 years ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•