diff --git a/tests/python/gaia-ui-tests/gaiatest/gaia_test.py b/tests/python/gaia-ui-tests/gaiatest/gaia_test.py index 32c89c7bf28f..5809cf92b2c7 100644 --- a/tests/python/gaia-ui-tests/gaiatest/gaia_test.py +++ b/tests/python/gaia-ui-tests/gaiatest/gaia_test.py @@ -9,6 +9,7 @@ from marionette import MarionetteTestCase, EnduranceTestCaseMixin, \ B2GTestCaseMixin, MemoryEnduranceTestCaseMixin from marionette.by import By +from marionette import expected from marionette.errors import NoSuchElementException from marionette.errors import StaleElementException from marionette.errors import TimeoutException @@ -509,10 +510,9 @@ def start_b2g(self, timeout=60): self.marionette.wait_for_port() self.marionette.start_session() - # Wait for the AppWindowManager to have registered the frame as active (loaded) - locator = (By.CSS_SELECTOR, 'div.appWindow.active.render') - Wait(marionette=self.marionette, timeout=timeout, ignored_exceptions=NoSuchElementException)\ - .until(lambda m: m.find_element(*locator).is_displayed()) + # Wait for the homescreen to finish loading + Wait(self.marionette, timeout).until(expected.element_present( + By.CSS_SELECTOR, '#homescreen[loading-state=false]')) @property def is_b2g_running(self):