Ejemplo n.º 1
0
 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
Ejemplo n.º 2
0
 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()
Ejemplo n.º 3
0
 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()
Ejemplo n.º 4
0
 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)
Ejemplo n.º 5
0
 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()
Ejemplo n.º 6
0
 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()
Ejemplo n.º 7
0
 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)
Ejemplo n.º 8
0
 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
Ejemplo n.º 9
0
 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)
Ejemplo n.º 10
0
 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)