Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 1011033 - Wait for homescreen to be loaded when restarting B2G. r…
Browse files Browse the repository at this point in the history
…=bsilverberg
  • Loading branch information
davehunt committed Jul 31, 2014
1 parent f6702e2 commit f0a2cd4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/python/gaia-ui-tests/gaiatest/gaia_test.py
Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit f0a2cd4

Please sign in to comment.