need to accept coordinates for single_tap/double_tap

RESOLVED FIXED in Firefox 21

Status

Testing
Marionette
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mdas, Assigned: Ann(Yiming))

Tracking

Trunk
mozilla21
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox20 wontfix, firefox21 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Right now, we can do:

element.single_tap()
element.double_tap()

but we'd like to do be able to do

element.single_tap(x, y)
element.double_tap(x, y)

where (x,y) are some coordinates relative to the top left of the element.
(Assignee)

Comment 1

4 years ago
Created attachment 709226 [details] [diff] [review]
adding coordinates
Attachment #709226 - Flags: review?(mdas)
Comment on attachment 709226 [details] [diff] [review]
adding coordinates

Review of attachment 709226 [details] [diff] [review]:
-----------------------------------------------------------------

::: testing/marionette/client/marionette/tests/unit/test_touch.py
@@ +11,5 @@
>  class testTouch(MarionetteTestCase):
>      def test_touch(self):
>        testTouch = self.marionette.absolute_url("testTouch.html")
>        self.marionette.navigate(testTouch)
>        button = self.marionette.find_element("id", "mozLink")

Shouldn't we be using "mozLinkPos" here?

AFAIK, this shouldn't pass with mozLink. If it does, it's somehow tapping mozLink even though the tap gesture isn't near the element. Can you verify that mozLink doesn't work?
(Assignee)

Comment 3

4 years ago
Created attachment 710308 [details] [diff] [review]
small fix

The test looks for the element mozLink, then it calls single_tap(0,300) on the element. The new coordinates are actually on the element mozLinkPos instead of mozLink. So mozLinkPos got tapped. Though users are unlikely to do things like this, but in our tests, we want to make sure the coordinates are calculated accurately.
Attachment #709226 - Attachment is obsolete: true
Attachment #709226 - Flags: review?(mdas)
Attachment #710308 - Flags: review?(mdas)
Comment on attachment 710308 [details] [diff] [review]
small fix

Review of attachment 710308 [details] [diff] [review]:
-----------------------------------------------------------------

thanks! I'll land it soon
Attachment #710308 - Flags: review?(mdas) → review+
landed in mozilla-inbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/53c091a119ed
https://hg.mozilla.org/mozilla-central/rev/53c091a119ed
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
Comment on attachment 710308 [details] [diff] [review]
small fix

Review of attachment 710308 [details] [diff] [review]:
-----------------------------------------------------------------

This patch is needed to land bug 836375 in mozilla-b2g18. It's for will be very helpful for testing and only affects the Marionette test framework.

[Approval Request Comment]
Bug caused by (feature/regressing bug #): 
User impact if declined: 
Testing completed: 
Risk to taking this patch (and alternatives if risky): 
This adds some features to marionette, and we can't land other testing features without it.
Test-only and no user impact.
String or UUID changes made by this patch:
Attachment #710308 - Flags: approval-mozilla-b2g18?

Updated

4 years ago
Attachment #710308 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
https://hg.mozilla.org/releases/mozilla-b2g18/rev/39453c2354dd
status-b2g18: --- → fixed
status-b2g18-v1.0.0: --- → wontfix
status-b2g18-v1.0.1: --- → wontfix
status-firefox20: --- → wontfix
status-firefox21: --- → fixed
https://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/0b946dd5ed67
status-b2g18-v1.0.1: wontfix → fixed
You need to log in before you can comment on or make changes to this bug.