Closed
Bug 1213355
Opened 9 years ago
Closed 9 years ago
GaiaHeader.go_back shows ElementNotVisibleException
Categories
(Firefox OS Graveyard :: Gaia::UI Tests, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: njpark, Assigned: martijn.martijn)
References
Details
Attachments
(1 file, 2 obsolete files)
Caused by Bug 1203456, in some cases the locator for the back button cannot be found.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → martijn.martijn
Assignee | ||
Comment 1•9 years ago
|
||
Comment 2•9 years ago
|
||
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8672106 [details]
[gaia] mwargers:1213355 > mozilla-b2g:master
This turned out to be much more complicated than I hoped.
The problem was that there are times, when there are multiple sections with class="current" and the locator was always taking the first one.
Also, there was one place where there was a back button in the gaiaheaders which was not a shadow dom element.
And finally, there was a case where there was still usage of a HTML header instead of a GaiaHeader.
It makes me wonder how this used to work.
Attachment #8672106 -
Flags: review?(npark)
Attachment #8672106 -
Flags: review?(jlorenzo)
Reporter | ||
Comment 4•9 years ago
|
||
It passes everywhere in settings, but it fails in one place - Privacy Control About page. so the RTL/test_settings_PS_RTL.py fails in line 52. Below script snippet will get you there faster.
The problem is that the _back_button_locator = (By.CSS_SELECTOR, 'button.action-button') is not visible, and neither is its correct locator, (By.CSS_SELECTOR, 'a.pp-link.back'). I couldn't figure out how to tap the back button other than doing self.root_element.tap(25,25). if there is no way around it, perhaps I should make it manual for this page only. let me know.
class TestSettingsRTLPS(GaiaImageCompareTestCase):
def test_settings_app(self):
settings = Settings(self.marionette)
settings.launch()
################# Privacy Controls ######################
privacycontrol_page = settings.open_privacy_controls()
self.apps.switch_to_displayed_app()
privacycontrol_page.tap_close_tour()
self.take_screenshot('privacy_control')
privacycontrol_page.tap_about()
self.take_screenshot('privacy_control-about')
privacycontrol_page.return_to_prev_menu(privacycontrol_page.screen_element, privacycontrol_page.about_screen_element)
it gives following error:
TEST-UNEXPECTED-ERROR | test_settings_PS_RTL.py TestSettingsRTLPS.test_settings_app | NoSuchElementException: NoSuchElementException: Unable to locate element: button[type="reset"]
Traceback (most recent call last):
File "/Users/mozilla/.virtualenvs/2.5/lib/python2.7/site-packages/marionette_client-1.0.0-py2.7.egg/marionette/marionette_test.py", line 296, in run
testMethod()
File "/Users/mozilla/GitRepo/gaia/tests/python/gaia-ui-tests/gaiatest/tests/graphics/RTL/test_settings_PS_RTL.py", line 62, in test_settings_app
privacycontrol_page.return_to_prev_menu(privacycontrol_page.screen_element, privacycontrol_page.about_screen_element)
File "/Users/mozilla/GitRepo/gaia/tests/python/gaia-ui-tests/gaiatest/apps/settings/regions/privacy_controls.py", line 64, in return_to_prev_menu
GaiaHeader(self.marionette, exit_view.find_element(*self._header_locator)).go_back()
File "/Users/mozilla/GitRepo/gaia/tests/python/gaia-ui-tests/gaiatest/form_controls/header.py", line 24, in go_back
self.root_element.find_element(*self._close_button_locator).tap()
Reporter | ||
Updated•9 years ago
|
Attachment #8672106 -
Flags: review?(npark)
Reporter | ||
Comment 5•9 years ago
|
||
I'm beginning to think this may be a bug with Privacy Controls app
Assignee | ||
Comment 6•9 years ago
|
||
Comment on attachment 8672106 [details]
[gaia] mwargers:1213355 > mozilla-b2g:master
Ok, I've now gone through all the RTL tests and they all pass with the additional changes I made.
Indeed, I think the Privacy Controls app is still using some old non-standard way of going back.
Attachment #8672106 -
Flags: review?(jlorenzo) → review?(npark)
Reporter | ||
Comment 7•9 years ago
|
||
Comment on attachment 8672106 [details]
[gaia] mwargers:1213355 > mozilla-b2g:master
Thanks for this workaround! i was going to fix the surrounding issues (i.e., sound->display and the copy of prev_menu method in privacy controls) myself, but apparently you got around to that too.
Attachment #8672106 -
Flags: review?(npark) → review+
Assignee | ||
Updated•9 years ago
|
Attachment #8672106 -
Flags: review?(jlorenzo)
Assignee | ||
Comment 8•9 years ago
|
||
Regarding the return_to_prev_menu2 method, it looks weird, but I need this because the Privacy controls app is using some old method to go back.
Perhaps we should file a bug on that to get that fixed? (if there isn't already)
Comment on attachment 8672106 [details]
[gaia] mwargers:1213355 > mozilla-b2g:master
Like discussed on IRC, bug 1182129 removed the privacy panel, which made most of the changes introduced in this PR, not necessary. Sorry about that quick unexpected bitrot.
I'm not sure if this bug should be closed as RESOLVED WONTFIX. If not, please ask me for review afterwards.
Attachment #8672106 -
Flags: review?(jlorenzo)
Assignee | ||
Comment 10•9 years ago
|
||
I think we can remove the things related to the privacy panel, but we still need the other parts.
Comment 12•9 years ago
|
||
Comment 13•9 years ago
|
||
Reporter | ||
Updated•9 years ago
|
Attachment #8674505 -
Flags: review?(martijn.martijn)
Attachment #8674505 -
Flags: review?(jlorenzo)
Reporter | ||
Updated•9 years ago
|
Attachment #8672106 -
Attachment is obsolete: true
Reporter | ||
Updated•9 years ago
|
Attachment #8674505 -
Attachment is obsolete: true
Attachment #8674505 -
Flags: review?(martijn.martijn)
Attachment #8674505 -
Flags: review?(jlorenzo)
Reporter | ||
Updated•9 years ago
|
Attachment #8674522 -
Flags: review?(martijn.martijn)
Attachment #8674522 -
Flags: review?(jlorenzo)
Comment on attachment 8674522 [details]
[gaia] npark-mozilla:1213355 > mozilla-b2g:master
Looks good to me, modulo the couple of nits in the PR.
Attachment #8674522 -
Flags: review?(jlorenzo) → review+
Assignee | ||
Comment 15•9 years ago
|
||
Comment on attachment 8674522 [details]
[gaia] npark-mozilla:1213355 > mozilla-b2g:master
I'm seeing all kinds of changes in the pull request that are unrelated to what this bug was about, for instance in fxaccounts.py and take_screenshot stuff.
Is that what you intended to do here?
They don't necessarily look wrong to me, but it is confusing. It seems better to fix 1 bug at a time in a pull request.
Attachment #8674522 -
Flags: review?(martijn.martijn) → review+
Reporter | ||
Comment 16•9 years ago
|
||
Reporter | ||
Updated•9 years ago
|
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•