def get_text(self, selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT): element = page_actions.wait_for_element_visible( self.driver, selector, by, timeout) return element.text
def click(self, selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT): element = page_actions.wait_for_element_visible( self.driver, selector, by, timeout=timeout) element.click() if settings.WAIT_FOR_RSC_ON_CLICKS: self.wait_for_ready_state_complete()
def wait_for_element_visible(self, selector, by=By.CSS_SELECTOR, timeout=settings.LARGE_TIMEOUT): if selector.startswith('/') or selector.startswith('./'): by = By.XPATH return page_actions.wait_for_element_visible(self.driver, selector, by, timeout)
def click(self, selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT): if selector.startswith('/') or selector.startswith('./'): by = By.XPATH element = page_actions.wait_for_element_visible( self.driver, selector, by, timeout=timeout) self._demo_mode_scroll_if_active(selector, by) element.click() if settings.WAIT_FOR_RSC_ON_CLICKS: self.wait_for_ready_state_complete() self._demo_mode_pause_if_active()
def click(self, selector, by=By.CSS_SELECTOR, timeout=settings.SMALL_TIMEOUT): if selector.startswith('/') or selector.startswith('./'): by = By.XPATH element = page_actions.wait_for_element_visible(self.driver, selector, by, timeout=timeout) self._demo_mode_scroll_if_active(selector, by) element.click() if settings.WAIT_FOR_RSC_ON_CLICKS: self.wait_for_ready_state_complete() self._demo_mode_pause_if_active()
def wait_for_element_visible(self, selector, by=By.CSS_SELECTOR, timeout=settings.LARGE_TIMEOUT): if selector.startswith('/') or selector.startswith('./'): by = By.XPATH return page_actions.wait_for_element_visible( self.driver, selector, by, timeout)
def wait_for_element_visible(self, selector, by=By.CSS_SELECTOR, timeout=settings.LARGE_TIMEOUT): return page_actions.wait_for_element_visible( self.driver, selector, by, timeout)