Closed Bug 750271 Opened 8 years ago Closed 7 years ago
Add touch support to Marionette
Add the selenium atoms for touch support as soon as possible, as many of the gaia tests will rely on gestures.
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.
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.
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.
(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
See Also: → 809245
We'll be implementing this using DOM level touch events.
Assignee: nobody → yiyang
So what's the difference to bug 809245?
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.
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.
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: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.