Closed
Bug 938242
Opened 11 years ago
Closed 11 years ago
remove visibility check in Actions
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(firefox26 wontfix, firefox27 wontfix, firefox28 fixed, b2g-v1.2 fixed)
RESOLVED
FIXED
mozilla28
People
(Reporter: etienne, Assigned: automatedtester)
References
Details
Attachments
(1 file)
1.36 KB,
patch
|
mdas
:
review+
|
Details | Diff | Splinter Review |
In bug 936585 we're testing edge gestures that are initiated on "invisible" panels on each side of the screen. We have to enable the debug mode during the test (which gives the panels some opacity) in order to cover this with marionette tests. Otherwise we get a: ElementNotVisible: (11) Element is not currently visible and may not be manipulated I wonder if there is a strong enough use case to add an option allowing the manipulation of invisible elements.
Comment 1•11 years ago
|
||
You could try touching on the top-most visible element but use pixel references to target the actual invisible panel section. As the touch events come in at native/Gecko level it should work but you never know, it might not.
Comment 2•11 years ago
|
||
It works exactly as I described above in comment #1. Here we have done it with Python tests https://github.com/mozilla-b2g/gaia/pull/13697/files However it does not work on desktopb2g owing to bug #891882
Assignee | ||
Comment 3•11 years ago
|
||
Is Actions not good enough for this? Since they should be "do what I say" type API and should ignore visibility.
Comment 4•11 years ago
|
||
(In reply to David Burns :automatedtester from comment #3) > Is Actions not good enough for this? Since they should be "do what I say" > type API and should ignore visibility. Actions check the visibility of the element you're pressing on: https://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette-listener.js#941
Comment 5•11 years ago
|
||
(In reply to Malini Das [:mdas] from comment #4) > Actions check the visibility of the element you're pressing on: > https://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette- > listener.js#941 The actions interfaces are meant to call down to the underlying mouse interaction layer. It'll calculate coordinates, so if those can't be derived there's an error. But once those are done, the click happens at a point, not on an element. Hence the visibility check on the “underlying” element seems wrong.
Comment 6•11 years ago
|
||
(In reply to Andreas Tolfsen (:ato) from comment #5) > (In reply to Malini Das [:mdas] from comment #4) > > Actions check the visibility of the element you're pressing on: > > https://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette- > > listener.js#941 > > The actions interfaces are meant to call down to the underlying mouse > interaction layer. It'll calculate coordinates, so if those can't be > derived there's an error. But once those are done, the click happens at a > point, not on an element. Hence the visibility check on the “underlying” > element seems wrong. Heh, I'm not saying that it's right, I'm just saying that's the current behaviour. We can change it since that makes more sense
Comment 7•11 years ago
|
||
There is a simple workaround anyway; just like I did in the Python version linked above. I would not like the option to manipulate invisible elements. It would be open to abuse through lazy programming, result in poor UI testing and loads of false positives.
Assignee | ||
Comment 8•11 years ago
|
||
(In reply to Andreas Tolfsen (:ato) from comment #5) > (In reply to Malini Das [:mdas] from comment #4) > > Actions check the visibility of the element you're pressing on: > > https://mxr.mozilla.org/mozilla-central/source/testing/marionette/marionette- > > listener.js#941 > > The actions interfaces are meant to call down to the underlying mouse > interaction layer. It'll calculate coordinates, so if those can't be > derived there's an error. But once those are done, the click happens at a > point, not on an element. Hence the visibility check on the “underlying” > element seems wrong. This is correct, for actions we shouldnt call down to visibility (and I probably said it wrong in the first place, sorry). Actions is a "Do what I say" API For API elements hanging off webelement, so click(), send_keys() and tap() we should check visibility. WebElement API is " Do what I mean" API. Hope that clarifies things.
Assignee | ||
Comment 9•11 years ago
|
||
(In reply to Zac C (:zac) from comment #7) > There is a simple workaround anyway; just like I did in the Python version > linked above. > > I would not like the option to manipulate invisible elements. It would be > open to abuse through lazy programming, result in poor UI testing and loads > of false positives. So we arent going too add an option, we are just doing another alignment with WebDriver. The Actions API can abuse things anyway. For times where we are using actions to get around visibility bugs I would want us to document( read as raise bug depending on the visibility bug) so that the Right Way™ is then put in place
Updated•11 years ago
|
Summary: Add an option to manipulate invisible elements → remove visibility check in Actions
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Assignee | ||
Comment 10•11 years ago
|
||
pushed to try will check later
Assignee | ||
Comment 11•11 years ago
|
||
Try is green https://tbpl.mozilla.org/?tree=Try&rev=0868481e4cc7 https://tbpl.mozilla.org/?tree=Try&rev=929868dd4a03
Assignee | ||
Comment 12•11 years ago
|
||
Attachment #8339258 -
Flags: review?(mdas)
Comment 13•11 years ago
|
||
Comment on attachment 8339258 [details] [diff] [review] Remove the visibility checks for touch actions in Marionette; Review of attachment 8339258 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8339258 -
Flags: review?(mdas) → review+
Assignee | ||
Comment 14•11 years ago
|
||
Landed in https://hg.mozilla.org/integration/mozilla-inbound/rev/234a044ca942
Comment 15•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/234a044ca942
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Comment 16•11 years ago
|
||
Can we get this into b2g26_v1.2 as well, so we can enable the music app tests there too?
Flags: needinfo?(dburns)
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(dburns)
Whiteboard: [checkin-needed-b2g26]
Comment 17•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-b2g26_v1_2/rev/062ee6fe46df
status-b2g-v1.2:
--- → fixed
status-firefox26:
--- → wontfix
status-firefox27:
--- → wontfix
status-firefox28:
--- → fixed
Whiteboard: [checkin-needed-b2g26]
Updated•1 year ago
|
Product: Testing → Remote Protocol
You need to log in
before you can comment on or make changes to this bug.
Description
•