Closed Bug 1013222 Opened 10 years ago Closed 8 years ago

WebElement.is_displayed() returns True even when lockscreen element not displayed on the screen

Categories

(Remote Protocol :: Marionette, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: RobertC, Unassigned)

References

Details

(Keywords: pi-marionette-server, Whiteboard: [fromAutomation][affects=b2g])

Attachments

(2 files)

Attached file page_source.html
test_lockscreen_unlock_to_camera.TestLockScreen.test_unlock_to_camera is failing because the lockscreen element is still interpreted as displayed even though it isn't.

Build info:
Gaia      8a2352d5b7be27ec4b1ea18c680ebcd0b6d34348
Gecko     https://hg.mozilla.org/mozilla-central/rev/cb9f34f73ebe
BuildID   20140519160202
Version   32.0a1
ro.build.version.incremental=eng.tclxa.20131223.163538
ro.build.date=Mon Dec 23 16:36:04 CST 2013

This issue could not be reproduced manually. When unlocking to camera the functionality is as expected. I have attached the page source at the moment of the failure.

Traceback (most recent call last):
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.smoketest/.env/local/lib/python2.7/site-packages/marionette_client-0.7.7-py2.7.egg/marionette/marionette_test.py", line 163, in run
testMethod()
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.smoketest/tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera.py", line 25, in test_unlock_to_camera
lock_screen.wait_for_lockscreen_not_visible()
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.smoketest/tests/python/gaia-ui-tests/gaiatest/apps/lockscreen/app.py", line 58, in wait_for_lockscreen_not_visible
self.wait_for_element_not_displayed(*self._lockscreen_locator)
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.smoketest/tests/python/gaia-ui-tests/gaiatest/apps/base.py", line 48, in wait_for_element_not_displayed
lambda m: not m.find_element(by, locator).is_displayed())
File "/var/jenkins/workspace/b2g.hamachi.mozilla-central.ui.smoketest/.env/local/lib/python2.7/site-packages/marionette_client-0.7.7-py2.7.egg/marionette/wait.py", line 143, in until
cause=last_exc)
TimeoutException: TimeoutException: Timed out after 30.1 seconds

Last run in which the test failed:
http://selenium.qa.mtv2.mozilla.com:8080/job/b2g.hamachi.mozilla-central.ui.smoketest/36/testReport/test_lockscreen_unlock_to_camera/TestLockScreen/test_unlock_to_camera/

Test link:
https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/tests/functional/lockscreen/test_lockscreen_unlock_to_camera.py
Blocks: 1011784
STR from https://bugzilla.mozilla.org/show_bug.cgi?id=1011784#c1

hook pdb into Lockscreen.wait_for_lockscreen_not_visible(), and get the following result:

(Pdb) ls = self.marionette.find_element('id', 'lockscreen')
(Pdb) ls.is_displayed()
True
(Pdb) ls.get_attribute('class')
u'unlocked hidden'
The test is passing now, the issue could have been caused by a change in gaia.
Closing this.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
I could reproduce this locally and it failed in the latest run on CI:

http://selenium.qa.mtv2.mozilla.com:8080/view/B2G%20Hamachi/job/b2g.hamachi.mozilla-central.ui.smoketest/49/HTML_Report/
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
This started passing now in http://selenium.qa.mtv2.mozilla.com:8080/view/B2G%20Hamachi/job/b2g.hamachi.mozilla-central.ui.smoketest/57/HTML_Report/

Gaia      26d8fcab9b61f46451600f39c51e0387ef3c4f88                        
Gecko     https://hg.mozilla.org/mozilla-central/rev/e6f113c83095         
BuildID   20140530040207                                                  
Version   32.0a1                                                          
ro.build.version.incremental=eng.tclxa.20131223.163538                    
ro.build.date=Mon Dec 23 16:36:04 CST 2013
This test referred in comment #4 has a false positive.

The bug here is still valid, but to provide a more accurate STR:

1. Set a passcode on the device
2. Lock the device
3. Run:
>>> ls = m.find_element('id', 'lockscreen')
>>> ls.is_displayed()
True

4. Activate the passcode screen but without unlocking the device, tap the camera so you go into 'locked camera' mode

5. Run:
>>> ls.is_displayed()
True
Blocks: 865232
Status: REOPENED → NEW
Whiteboard: [fromAutomation] → [fromAutomation][affects=b2g]
Attached patch all.diffSplinter Review
This can still be reproduce using this patch and with the mentioned test in the patch.
Lockscreen is part of the system app, which I think is always visible, the lockscreen is apparently also still visible, but in this case, when the camera is open, is completely overlayed by the camera app.
Closing out B2G related bugs. If these still happen and are valuable, please reopen with details again and how this affects Desktop/Fennec
Status: NEW → RESOLVED
Closed: 10 years ago8 years ago
Resolution: --- → WONTFIX
Product: Testing → Remote Protocol
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: