def search(self, search_term): """ Searches for an app using the available search field :Args: - search_term - string value of the search field """ search_field = self.selenium.find_element(*self._search_locator) search_field.send_keys(search_term) search_field.submit() from pages.desktop.consumer_pages.search import Search return Search(self.testsetup, search_term)
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(lambda s: search_field.is_displayed()) search_field.send_keys(search_term) search_field.submit() from pages.desktop.consumer_pages.search import Search return Search(self.testsetup, search_term)
def search(self, search_term, click_arrow = True): """ Searches for an app using the available search field :Args: - search_term - string value of the search field - click_arrow - bool value that determines if the search button will be clicked or should the submit method be used :Usage: - search(search_term="text", click_arrow = False) """ search_field = self.selenium.find_element(*self._search_locator) search_field.send_keys(search_term) if click_arrow: self.selenium.find_element(*self._search_arrow_locator).click() else: search_field.submit() from pages.desktop.consumer_pages.search import Search return Search(self.testsetup, search_term)