Closed Bug 836952 Opened 11 years ago Closed 11 years ago

need to accept coordinates for single_tap/double_tap

Categories

(Remote Protocol :: Marionette, defect)

defect
Not set
normal

Tracking

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

RESOLVED FIXED
mozilla21
Tracking Status
firefox20 --- wontfix
firefox21 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed

People

(Reporter: mdas, Assigned: annyang121)

Details

Attachments

(1 file, 1 obsolete file)

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.
Attached patch adding coordinates (obsolete) — Splinter Review
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?
Attached patch small fixSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/53c091a119ed
Status: NEW → RESOLVED
Closed: 11 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?
Attachment #710308 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: