Closed
Bug 813561
Opened 12 years ago
Closed 10 years ago
[B2G] Buttons under lockscreen are returning as visible
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: zcampbell, Assigned: automatedtester)
References
Details
(Keywords: pi-marionette-displayed, Whiteboard: [displayed])
The unlock buttons beneath the new SVG lockscreen swipe area are interpreted as displayed by Marionette/WebDriver logic. -- Test case -- # Set device back to locked state _unlock_button_locator = ('id', 'lockscreen-area-unlock') unlock_button = self.marionette.find_element(_unlock_button_locator) assert False == unlock_button.is_displayed()
Assignee | ||
Comment 1•12 years ago
|
||
since I am doing visibility bugs I'll take this one
Assignee: nobody → dburns
Comment 2•11 years ago
|
||
Is there any update on this? Is it still blocking bug 801898?
Reporter | ||
Comment 3•11 years ago
|
||
Design of the lock screen has changed since this bug was raised but I'll re-run the test case and update as appropriate.
Reporter | ||
Comment 4•11 years ago
|
||
This is still valid with the current lockscreen design.
Assignee | ||
Comment 5•11 years ago
|
||
*sigh* its showing the body has as a height of 0.... which means Marionette thinks its doing the right thing... (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode" ,[unlock_button]).size {u'width': 320, u'height': 101} (Pdb) m.execute_script("return arguments[0]" ,[unlock_button]).size {u'width': 160, u'height': 120} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.ParentNode" ,[unlock_button]).tag_name *** AttributeError: 'NoneType' object has no attribute 'tag_name' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'body' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 0} (Pdb)
Assignee | ||
Comment 6•11 years ago
|
||
*sigh* its showing the body has as a height of 0.... which means Marionette thinks its doing the right thing... (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode" ,[unlock_button]).size {u'width': 320, u'height': 101} (Pdb) m.execute_script("return arguments[0]" ,[unlock_button]).size {u'width': 160, u'height': 120} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 480} (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.ParentNode" ,[unlock_button]).tag_name *** AttributeError: 'NoneType' object has no attribute 'tag_name' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'div' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).tag_name u'body' (Pdb) m.execute_script("return arguments[0].parentNode.parentNode.parentNode.parentNode.parentNode.parentNode" ,[unlock_button]).size {u'width': 320, u'height': 0} (Pdb)
Assignee | ||
Comment 7•11 years ago
|
||
Next steps: look at styles on the items to see when this is still visible and not hidden in the overflow
Assignee | ||
Comment 8•11 years ago
|
||
resetting owner in case people want it while away.
Assignee: dburns → nobody
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Assignee | ||
Comment 9•11 years ago
|
||
looking at this it appears that the buttons are visible iff the screen is on, when they are off then its not visible When screen on (Pdb) m.execute_script('return window.getComputedStyle(arguments[0]).getPropertyValue("visibility")', unlock_button]) u'visible' When screen is off (Pdb) m.execute_script('return window.getComputedStyle(arguments[0]).getPropertyValue("visibility")', unlock_button]) u'hidden' This means that if you do with the screen off will pass # Set device back to locked state _unlock_button_locator = ('id', 'lockscreen-area-unlock') unlock_button = self.marionette.find_element(_unlock_button_locator) assert False == unlock_button.is_displayed()
Assignee | ||
Comment 10•11 years ago
|
||
:Zac can you check that I have validated this correctly
Reporter | ||
Comment 11•11 years ago
|
||
I validated that they are still 'displayed' when the screen is on but I don't understand what the significance of them being displayed False when the screen is off. We never run with the screen off - the GaiaTestCase setUp always switches the screen on and sets the screen timeout to 'Never' so this is pretty unlikely to occur.
Assignee | ||
Comment 12•11 years ago
|
||
totally misunderstood the bug... silly me...
Reporter | ||
Comment 13•11 years ago
|
||
Nice to know it detects the screen off :)
Assignee | ||
Comment 14•11 years ago
|
||
so... let me tell you the story of a soothsayer called AutomatedTester that predicted this day in http://www.theautomatedtester.co.uk/blog/2013/could-css3-be-making-sites-that-are-not-testable.html It appears that we have animations at play here that are using CSS transforms to move the element. The class, that causes the animation, is attached via javascript during a touch and then removed (this is why I was missing it, I was looking for the obvious. The downside is that this will require a lot of work to the Selenium atoms, which we use and they suffer the same problem, to be able to handle this scenario correctly
Reporter | ||
Comment 15•11 years ago
|
||
Re-tested and still valid
Assignee | ||
Comment 16•11 years ago
|
||
It appears that the screen element is being overlayed so according to the current algorithm it is visible because the overlay isn't part of the tree that is searched. see debug info below TEST-START test_cards.py test_that_app_can_be_launched_from_cards_view (test_cards.TestSpace) ... > /home/davidburns/gaia-ui-tests/gaiatest/tests/test_cards.py(44)test_that_app_can_be_launched_from_cards_view() -> _unlock_button_locator = ('id', 'lockscreen-area-unlock') (Pdb) n > /home/davidburns/gaia-ui-tests/gaiatest/tests/test_cards.py(45)test_that_app_can_be_launched_from_cards_view() -> unlock_button = self.marionette.find_element(*_unlock_button_locator) (Pdb) n > /home/davidburns/gaia-ui-tests/gaiatest/tests/test_cards.py(74)test_that_app_can_be_launched_from_cards_view() -> ''' (Pdb) unlock_button.location {u'y': 380, u'x': 160} (Pdb) point = m.execute_script('return window.wrappedJSObject.document.elementFromPoint(160, 380);') *** NameError: name 'm' is not defined (Pdb) m=self.marionette ##### Unlock Button isnt visible on the screen (Pdb) point = m.execute_script('return window.wrappedJSObject.document.elementFromPoint(160, 380);') (Pdb) point.id == unlock_button.id False ##### Unlock Button is visible (Pdb) point2 = m.execute_script('return window.wrappedJSObject.document.elementFromPoint(160, 380);') (Pdb) point2.id == unlock_button.id True (Pdb)
Assignee | ||
Updated•10 years ago
|
Whiteboard: [displayed]
Assignee | ||
Updated•10 years ago
|
Keywords: ateam-marionette-displayed
Reporter | ||
Comment 17•10 years ago
|
||
We don't even have this lockscreen anymore, it'd be very difficult to debug.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
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
•