Last Comment Bug 833061 - tap() not working correctly on ftu button
: tap() not working correctly on ftu button
Status: RESOLVED WORKSFORME
:
Product: Testing
Classification: Components
Component: Marionette (show other bugs)
: Trunk
: All Gonk (Firefox OS)
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 869034 801898
  Show dependency treegraph
 
Reported: 2013-01-21 12:05 PST by Malini Das [:mdas] - Away, not checking bugmail
Modified: 2013-08-16 04:33 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Another test case (1.51 KB, text/plain)
2013-03-19 03:04 PDT, Zac C (:zac)
no flags Details

Description Malini Das [:mdas] - Away, not checking bugmail 2013-01-21 12:05:58 PST
In https://github.com/mozilla/gaia-ui-tests/pull/279, the tap() gesture on the Change button in the timezone selection page of ftu is not working (https://github.com/mozilla/gaia-ui-tests/pull/279#discussion_r2674100).

The odd thing is, I can confirm that the events sent from marionette to the window are the exact same as those sent if I physically tapped the screen aon that button (touchstart/touchend/mousedown/mouseup/click). Perhaps we're tapping the wrong element? I added a tap to the first button with class name 'change icon icon-dialog', but that doesn't seem to help.
Comment 1 Malini Das [:mdas] - Away, not checking bugmail 2013-01-24 13:26:45 PST
I've been testing this by adding an id to the button we want to interact with. I can see that tap() is successfully dispatching touchevents to the window, so this doesn't seem like a problem with marionette. It may be that buttons of these type have something on them that prevent us from tapping or clicking on them...

It seems that buttons with class 'icon' will have pointer-events set to none, so it's never the target of mouse events. I'm not sure if this is related to why our tap (which is touch/mouse/click events) or our click (which is the DOM click() method) don't work. I've tried setting pointer-events to auto, but this doesn't get us any closer. I think we'll need to get the gaia dev who wrote ftu on this bug to help us resolve how we can do test automation on these buttons.
Comment 2 Stephen Donner [:stephend] 2013-01-24 13:33:10 PST
Fernando, Francisco, can either/both of you help, here?  Thanks :-)
Comment 3 Malini Das [:mdas] - Away, not checking bugmail 2013-01-24 16:37:33 PST
So it turns out we have to dispatch events to the tz-region element, but still, I get no results.  I can confirm that we're dispatching touchevents to that page, and it should work, but in this case, it just isn't.


FYI, for the testing folk, this element is not visible, and our standard automation calls like click/tap don't allow for us to interact with non-visible elements due to the browser automation spec(https://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html#clicking, this is for clicking, but touch events are the same), so our standard tap() and click() commands won't work here, but I've been testing with tap/click commands that don't check visibility and just dispatch the event regardless. I can add this type of method to the gaia-ui-test framework to let us do this, so we shouldn't worry about it being visible or not.
Comment 4 Zac C (:zac) 2013-01-25 08:37:35 PST
Sounds a bit of a dirty work-around :(
Comment 5 Malini Das [:mdas] - Away, not checking bugmail 2013-01-25 08:41:26 PST
(In reply to Zac C (:zac) from comment #4)
> Sounds a bit of a dirty work-around :(

Yeah, I'm not sure why the thing we want to click is non-visible. It'd be much more helpful if the listener was on the actual visible button.
Comment 6 Zac C (:zac) 2013-03-19 03:04:56 PDT
Created attachment 726558 [details]
Another test case

We have now another very similar test case which involves tapping on a select box (or fake-select box) in the Settings app. In the same as comment #1 of this bug I've tried tapping on numerous other elements in and around to try and trigger the select box to be opened but to no avail.

This is high priority as it surrounds changing the Language of Gaia.
Comment 7 Malini Das [:mdas] - Away, not checking bugmail 2013-08-06 17:31:43 PDT
I just replaced all the click commands with tap and it all works now. I think it is safe to transition the ftu app to tap() now. Reopen if you still see issues please!
Comment 8 Florin Strugariu [:Bebe] 2013-08-14 07:51:18 PDT
Hi Malini,


I still can see this issue. Now in the FTU app neither click() or tap() work in the "Date & Time" screen

The locators did not changed and the elements are still visibile.


Here is what I see in logcat:

D/wpa_supplicant( 5372): nl80211: survey data missing!
I/Gecko   ( 5233): 1376491812074	Marionette	TRACE	Got: {"using": "css selector", "session": "6-b2g", "type": "findElement", "value": "#time-form li:nth-child(1) > .change.icon.icon-dialog", "to": "0"}
I/Gecko   ( 5233): 1376491812100	Marionette	INFO	sendToClient: {"from":"0","value":"{8b1d673c-b65a-4bc0-a546-b9b179f47eac}"}, {b6657c7d-f8ef-4eda-aa68-891fc8a3a7e5}, {b6657c7d-f8ef-4eda-aa68-891fc8a3a7e5}
I/Gecko   ( 5233): 1376491812111	Marionette	TRACE	Got: {"element": "{8b1d673c-b65a-4bc0-a546-b9b179f47eac}", "to": "0", "session": "6-b2g", "y": null, "x": null, "type": "singleTap"}
I/Gecko   ( 5347): Marionette: emitting Touch event of type touchstart to element with id:  and tag name: BUTTON at coordinates (250, 234) relative to the viewport
I/Gecko   ( 5347): Marionette: emitting Touch event of type touchend to element with id:  and tag name: BUTTON at coordinates (250, 234) relative to the viewport
I/Gecko   ( 5347): Marionette: emitting Mouse event of type mousemove at coordinates (250, 234) relative to the viewport
I/Gecko   ( 5347): Marionette: emitting Mouse event of type mousedown at coordinates (250, 234) relative to the viewport
I/Gecko   ( 5347): Marionette: emitting Mouse event of type mouseup at coordinates (250, 234) relative to the viewport
I/Gecko   ( 5233): 1376491812196	Marionette	INFO	sendToClient: {"from":"0","ok":true}, {92ea99fc-7e3a-4412-abd9-0c9508244b17}, {92ea99fc-7e3a-4412-abd9-0c9508244b17}
D/wpa_supplicant( 5372): nl80211: survey data missing!



I can see this on:
Gecko  http://hg.mozilla.org/mozilla-central/rev/3c61cc01a3b1
Gaia  9e0f6e30e5e28f88b4bbb4acb5e1fc99cdf7b7e7
BuildID 20130814040203
Version 26.0a1
Comment 9 Florin Strugariu [:Bebe] 2013-08-16 04:33:59 PDT
It works now.

Gecko  http://hg.mozilla.org/mozilla-central/rev/a8daa428ccbc
Gaia  58bb05efc83407428099a182244a1759ab84cd0b
BuildID 20130815040204
Version 26.0a1


Don't know why but it works :D

closing this

Note You need to log in before you can comment on or make changes to this bug.