예제 #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
예제 #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()
예제 #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()
예제 #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)
예제 #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()
예제 #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()
예제 #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)
예제 #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
예제 #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)
예제 #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)