Exemplo n.º 1
0
    def wait_for_element_not_present(self, locator):
        """
        Synchronization helper to wait until some element is removed from the page 

        :raises: ElementVisiblityTimeout
        """
        for i in range(timeout_seconds):
            if SaunterWebDriver.is_element_present(locator):
                time.sleep(1)
            else:
                break
        else:
            raise ElementVisiblityTimeout("%s presence timed out" % locator)
        return True
Exemplo n.º 2
0
 def is_element_available(self, locator):
     """
     Synchronization method for making sure the element we're looking for is not only on the page,
     but also visible -- since Se will happily deal with things that aren't visible.
     
     Use this instead of is_element_present most of the time.
     """
     if SaunterWebDriver.is_element_present(locator):
         if SaunterWebDriver.is_visible(locator):
             return True
         else:
             return False
     else:
         return False
Exemplo n.º 3
0
 def is_collar_selected(self, style):
     if SaunterWebDriver.is_element_present("%s .sl-deSel" % locators["collar style"].replace("REPLACE", style)):
         return False
     return True