def go_to_url(self, url): # In private windows, the URL bar displayed is not the regular Rocket bar. But once you # tap that URL bar, the regular Rocketbar comes back, in front of the private window. # That's why we wait for the private window to be hidden self._root_element.find_element(*self._url_bar_locator).tap() Wait(self.marionette).until(lambda m: self._root_element.get_attribute('aria-hidden') == 'true') from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def go_to_url(self, url): # The URL bar shown is actually in the system app not in this Search app. # We switch back to the system app, then tap the panel, but this will only # work from Search app which embiggens the input bar self.marionette.switch_to_frame() self.marionette.find_element(*self._url_bar_locator).tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def go_to_url(self, url): # In private windows, the URL bar displayed is not the regular Rocket bar. But once you # tap that URL bar, the regular Rocketbar comes back, in front of the private window. # That's why we wait for the private window to be hidden self._root_element.find_element(*self._url_bar_locator).tap() Wait(self.marionette).until(lambda m: self._root_element.get_attribute( 'aria-hidden') == 'true') from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def go_to_url(self, url): # The URL bar shown is actually in the system app not in this Search app. # We switch back to the system app, then tap the panel, but this will only # work from Search app which embiggens the input bar self.marionette.switch_to_frame() if self.is_element_present(*self._url_bar_locator): self.marionette.find_element(*self._url_bar_locator).tap() else: self._url_bar_locator = (By.CSS_SELECTOR, '.urlbar .title') self._root_element = self.marionette.find_element(*self._browser_app_locator) self._root_element.find_element(*self._url_bar_locator).tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def go_to_url(self, url): # The URL bar shown is actually in the system app not in this Search app. # We switch back to the system app, then tap the panel, but this will only # work from Search app which embiggens the input bar self.marionette.switch_to_frame() if self.is_element_present(*self._url_bar_locator): self.marionette.find_element(*self._url_bar_locator).tap() else: self._url_bar_locator = (By.CSS_SELECTOR, '.urlbar .title') self._root_element = self.marionette.find_element( *self._browser_app_locator) self._root_element.find_element(*self._url_bar_locator).tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def tap_search_bar(self): search_bar = self.marionette.find_element( *self._search_bar_icon_locator) search_bar.tap() # TODO These lines are a workaround for bug 1020974 import time time.sleep(1) self.marionette.switch_to_frame() self.marionette.find_element('id', 'rocketbar-form').tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel return SearchPanel(self.marionette)
def go_to_url(self, url): self.marionette.find_element(*self._url_bar_locator).tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel search_panel = SearchPanel(self.marionette) return search_panel.go_to_url(url)
def tap_search_bar(self): search_bar = self.marionette.find_element( *self._search_bar_icon_locator) search_bar.tap() from gaiatest.apps.homescreen.regions.search_panel import SearchPanel return SearchPanel(self.marionette)