Closed
Bug 813583
Opened 12 years ago
Closed 10 years ago
[B2G] Homescreen iframe not interpreted as visible
Categories
(Remote Protocol :: Marionette, defect)
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: zcampbell, Assigned: automatedtester)
References
Details
(Keywords: pi-marionette-displayed, Whiteboard: [displayed])
The homescreen iframe is not being seen as visible from the top level frame by Marionette. May also be true for other iframes but this is the only one I have checked thus far. --- Test Case ---- # Manual step: kill all apps # go to top level frame self.marionette.switch_to_frame() # Homescreen iframe locator _homescreen_frame_locator = ('css selector', 'iframe.homescreen') # visibility of frame will return False print self.marionette.find_element(_homescreen_frame_locator).is_displayed()
Assignee | ||
Comment 1•12 years ago
|
||
It would appear that the parent element of the iframe has a height of 0 >>> home.is_displayed() False >>> m.execute_script("return window.getComputedStyle(arguments[0]).getPropertyValue('display')" ,[home]) u'block' >>> m.execute_script("return window.getComputedStyle(arguments[0].parentNode).getPropertyValue('display')" ,[home]) u'block' >>> m.execute_script("return window.getComputedStyle(arguments[0].parentNode).getPropertyValue('overflow')" ,[home]) u'hidden' >>> parent = m.execute_script("return arguments[0].parentNode" ,[home]) >>> parent.size {u'width': 320, u'height': 0} So realistically it would appear that the visibility algorithm is correct.
Comment 2•12 years ago
|
||
Zac/David, are we saying this is either a Gaia or test issue?
Assignee | ||
Comment 3•12 years ago
|
||
:stephend My gut says this is a test issue but I would need to look more into it. Since the part of the frame has a height of 0 it cant be seen.
Comment 4•11 years ago
|
||
Any update on this? What tests are affected by this bug, and could we propose an alternative solution for them?
Reporter | ||
Comment 5•11 years ago
|
||
I don't think this is blocking a test (we at least have already come up with an alternative solution for it) but it was just raised as a marionette anomaly. I updated the test case. I guess this is something to do with observing a child frame from the top level frame (note first step in the test case). AutomatedTEster once explained to me that marionette can't traverse up and down iframes. (Example of that, lock the screen, switch to the homescren iframe and check its displayed state, it will == True, despite the lockscreen being active.) -- Updated Test Case -- self.marionette.switch_to_frame() # Homescreen iframe locator _homescreen_frame_locator = ('css selector', 'div.homescreen iframe') # visibility of frame will return False hs_frame = self.marionette.find_element(*_homescreen_frame_locator) print hs_frame.size print hs_frame.location print hs_frame.is_displayed()
Assignee | ||
Comment 6•11 years ago
|
||
I will look at this again after all the changes but if the element has a height of 0 then we need to work out the magic that the gaia devs are using for it to still be visible with it has no height
Reporter | ||
Comment 7•11 years ago
|
||
Thanks. No longer showing 0 for the height. Here is the output for the comment #5 test case: {u'width': 320, u'height': 460} {u'y': 20, u'x': 0} False
Assignee | ||
Comment 8•11 years ago
|
||
I will look at it, iirc it was a parent that had a height of 0
Assignee | ||
Comment 9•11 years ago
|
||
I had a test that just started things for me and then hit a debugger. When I try see if it is visible it is now showing that it is. (Pdb) _homescreen_frame_locator = ('css selector', 'iframe.homescreen') (Pdb) self.marionette.switch_to_frame() True (Pdb) _homescreen_frame_locator = ('css selector', 'div.homescreen iframe') (Pdb) home = self.marionette.find_element(*_homescreen_frame_locator) (Pdb) home.is_displayed() True (Pdb)
Assignee | ||
Comment 10•11 years ago
|
||
resetting assignee in case someone wants to do this before I get back
Assignee: dburns → nobody
Reporter | ||
Comment 11•11 years ago
|
||
I think I have worked out the problem here: If you run the test case after a fresh reboot or stop/start b2g it will interpret displayed=True. If you start an app, eg Contacts app, then run the test script, then the element will be displayed=False. In the test case I am also using the typical GaiaTestCase setUp (unlocking the screen and killing all running apps, etc) but I have omitted it for brevity.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → dburns
Assignee | ||
Comment 12•11 years ago
|
||
This appears to be suffering from the same issue as 813583
Assignee | ||
Comment 13•11 years ago
|
||
bug 813583 even
Assignee | ||
Updated•10 years ago
|
Whiteboard: [displayed]
Assignee | ||
Updated•10 years ago
|
Keywords: ateam-marionette-displayed
Reporter | ||
Comment 14•10 years ago
|
||
Not sure if the algo changed or the new homescreen resolved this but hs frame is now resolved displayed or not. Generally we also coded tests not to come up against this either.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WORKSFORME
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
•