Пример #1
0
 def wait_for_element_to_be_present_by_id(self, id):
     debug("Waiting for element by id '%s' to be present" % id)
     try:
         self.condition_element_present(by_id(id))
         debug("Element present by id '%s'" % id)
         return True
     except(NoSuchElementException, TimeoutException):
         error("Unable to find element by id '%s'" % id)
         return False
Пример #2
0
 def wait_for_element_to_be_displayed_by_id(self, id):
     debug("Waiting for element by id '%s' to be displayed" % id)
     try:
         self.condition_element_displayed(by_id(id))
         debug("Element found by id '%s'" % id)
         return True
     except(NoSuchElementException, TimeoutException):
         error("Unable to find element by id '%s'" % id)
         return False
Пример #3
0
 def wait_for_element_to_be_invisible_by_id(self, id):
     debug("Waiting for element by id '%s' to disappear" % id)
     try:
         self.condition_element_invisible(by_id(id))
         debug("Element by id '%s' is not displayed" % id)
         return True
     except(NoSuchElementException, TimeoutException):
         error("After waiting %s seconds, the element by id '%s' is still visible"
               % (str(self.implicit_wait), id))
         return False