def open_categories_menu(self): categories = self.selenium.find_element( *self._categories_header_locator) self.selenium.find_element( *self._categories_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until( expected.element_not_moving(categories))
def close_banner(self): close_banner_button = self.selenium.find_element( *self._close_banner_button_locator) bag_icon = self.selenium.find_element(*self._bag_icon_locator) if close_banner_button.is_displayed(): close_banner_button.click() WebDriverWait(self.selenium, self.timeout).until( expected.element_not_moving(bag_icon))
def open_settings_menu(self): settings_menu = self.selenium.find_element( *self._settings_menu_locator) if 'active' not in settings_menu.get_attribute('class'): self.selenium.find_element( *self._settings_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until( expected.element_not_moving(settings_menu))
def search(self, search_term): """ Searches for an app using the available search field :Args: - search_term - string value of the search field """ self.selenium.find_element(*self._search_toggle_locator).click() search_field = self.selenium.find_element(*self._search_input_locator) WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(search_field)) search_field.send_keys(search_term) search_field.submit() from pages.mobile.search import Search return Search(self.testsetup)
def search(self, search_term): """ Searches for an app using the available search field :Args: - search_term - string value of the search field """ self.selenium.find_element(*self._search_toggle_locator).click() search_field = self.selenium.find_element(*self._search_input_locator) WebDriverWait(self.selenium, self.timeout).until( expected.element_not_moving(search_field)) search_field.send_keys(search_term) search_field.submit() from pages.mobile.search import Search return Search(self.testsetup)
def close_banner(self): close_banner_button = self.selenium.find_element(*self._close_banner_button_locator) bag_icon = self.selenium.find_element(*self._bag_icon_locator) if close_banner_button.is_displayed(): close_banner_button.click() WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(bag_icon))
def open(self): menu = self.selenium.find_element(*self._more_menu_locator) if 'overlay-visible' not in menu.get_attribute('class'): self.selenium.find_element(*self._more_menu_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(menu))
def open(self): menu = self.selenium.find_element(*self._more_menu_locator) if 'overlay-visible' not in menu.get_attribute('class'): self.selenium.find_element(*self._more_menu_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until( expected.element_not_moving(menu))
def open_categories_menu(self): categories = self.selenium.find_element(*self._categories_header_locator) self.selenium.find_element(*self._categories_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(categories))
def open_settings_menu(self): settings_menu = self.selenium.find_element(*self._settings_menu_locator) if 'active' not in settings_menu.get_attribute('class'): self.selenium.find_element(*self._settings_toggle_locator).click() WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(settings_menu))
def click_categories(self): menu = self.selenium.find_element(*self._categories_menu_locator) self.selenium.find_element(*self._categories_button_locator).click() WebDriverWait(self.selenium, self.timeout).until(expected.element_not_moving(menu)) return self.Categories(self.testsetup)