Closed
Bug 1195341
Opened 9 years ago
Closed 8 years ago
Add scroll_to_element to base.py
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: martijn.martijn, Unassigned)
References
Details
From this pull request (from bug 1191471): https://github.com/mozilla-b2g/gaia/pull/31355
"
This call is great! Element.scrollIntoView() could be useful for the Graphics test in Settings. What do you think, @npark-mozilla ?
If so, how about moving that method into Base.py? Something like:
def scroll_to_element(element, should_be_at_top=True):
self.marionette.execute_script(
'arguments[0].scrollIntoView(arguments[1]);', [element, should_be_at_top])
"
I would only like to say that this is not a real simulation of what a user would do. Ideally, we should do a flinging action to make the element visible, right?
Although, I have to say, I don't think it matters much. We already use similar shortcuts where we just drop a whole bunch of text into text inputs instead of typing, using the vkb.
Reporter | ||
Comment 1•9 years ago
|
||
It turns out the tap() method on the HTMLElement class should automatically scroll the element into view when it's out of view, so we should actually never have to use this scrollIntoView thing at all.
However, this doesn't work very well at the moment. I filed bug 1200197 for one situation where this doesn't work well.
I guess there are still situations in Gaia UI test/imagecompare testing where we need scrollIntoView, but if we need it prior to a tap() call, then that means there is a bug in elementInViewPort in listener.js.
Depends on: 1200197
Reporter | ||
Comment 2•9 years ago
|
||
So it's actually better to limit the usage of scrollIntoView. There are probably a few cases where it shouldn't have been used:
http://mxr.mozilla.org/gaia/search?string=scrollintoview&find=.py
Reporter | ||
Updated•9 years ago
|
Assignee: martijn.martijn → nobody
Reporter | ||
Comment 3•8 years ago
|
||
Marking WONTFIX, sorry for the bug spam. If somebody still wants to work on this, please file a new bug for it.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•