in pages/desktop/base.py [0:0]
def search_for(self, term, execute=True):
self.wait.until(
EC.visibility_of_element_located(self._search_textbox_locator)
)
textbox = self.find_element(*self._search_textbox_locator)
textbox.click()
textbox.send_keys(term)
# Send 'enter' since the mobile page does not have a submit button
if execute:
textbox.send_keys(Keys.ENTER)
from pages.desktop.frontend.search import Search
return Search(self.driver, self.page).wait_for_page_to_load()
WebDriverWait(self.driver, 30).until(
EC.invisibility_of_element_located((By.CLASS_NAME, "LoadingText"))
)
return self.search_suggestions