Ejemplo n.º 1
0
 def wait_for_css_property(self, property, expected, msg=None, timeout=None):
     expected = unicode(expected)
     msg = (msg or "element's %s css property never became %s"
            % (property, expected))
     return spinAssert(msg,
                       lambda: expected == self.value_of_css_property(property),
                       timeout=timeout)
Ejemplo n.º 2
0
 def wait_for_location(self, expected, msg=None, timeout=None):
     msg = (msg or
            "element's location in the renderable canvas never became %s" %
            (expected))
     return spinAssert(msg,
                       lambda: expected in self.location,
                       timeout=timeout)
Ejemplo n.º 3
0
 def wait_for_attribute(self, attribute, expected, msg=None, timeout=None):
     if expected is True:
         expected = "true"
     if expected is False or expected is None:
         expected = "false"
     expected = unicode(expected)
     msg = (msg or "element's %s attribute never became %s" %
            (attribute, expected))
     return spinAssert(msg,
                       lambda: expected in self.get_attribute(attribute),
                       timeout=timeout)
Ejemplo n.º 4
0
 def wait_for_attribute(self, attribute, expected, msg=None, timeout=None):
     if expected is True:
         expected = "true"
     if expected is False or expected is None:
         expected = "false"
     expected = unicode(expected)
     msg = (msg or "element's %s attribute never became %s"
            % (attribute, expected))
     return spinAssert(msg,
                       lambda: expected in self.get_attribute(attribute),
                       timeout=timeout)
Ejemplo n.º 5
0
 def wait_for_css_property(self,
                           property,
                           expected,
                           msg=None,
                           timeout=None):
     expected = unicode(expected)
     msg = (msg or "element's %s css property never became %s" %
            (property, expected))
     return spinAssert(
         msg,
         lambda: expected == self.value_of_css_property(property),
         timeout=timeout)
Ejemplo n.º 6
0
 def wait_for_text(self, expected, msg=None, timeout=None):
     expected = unicode(expected)
     msg = msg or "element's text never became %s" % (expected)
     return spinAssert(msg, lambda: expected in self.text, timeout=timeout)
Ejemplo n.º 7
0
 def wait_for_tag_name(self, expected, msg=None, timeout=None):
     expected = unicode(expected)
     msg = msg or "element's tagName property never became %s" % (expected)
     return spinAssert(msg,
                       lambda: expected == self.tag_name,
                       timeout=timeout)
Ejemplo n.º 8
0
 def wait_for_size(self, expected, msg=None, timeout=None):
     msg = msg or "element's size never became %s" % (expected)
     return spinAssert(msg, lambda: expected == self.size, timeout=timeout)
Ejemplo n.º 9
0
 def wait_for_selected(self, expected=True, msg=None, timeout=None):
     msg = (msg or "element never became " +
            ("selected" if expected else "not selected"))
     return spinAssert(msg,
                       lambda: expected == self.is_selected(),
                       timeout=timeout)
Ejemplo n.º 10
0
 def wait_for_removed(self, msg=None, timeout=None):
     msg = (msg or "element was never removed")
     return spinAssert(
         msg,
         lambda: self._dodgy_test_for_element_being_removed_from_the_dom(),
         timeout=timeout)
Ejemplo n.º 11
0
 def wait_for_text(self, expected, msg=None, timeout=None):
     expected = unicode(expected)
     msg = msg or "element's text never became %s" % (expected)
     return spinAssert(msg, lambda: expected in self.text, timeout=timeout)
Ejemplo n.º 12
0
 def wait_for_tag_name(self, expected, msg=None, timeout=None):
     expected = unicode(expected)
     msg = msg or "element's tagName property never became %s" % (expected)
     return spinAssert(msg, lambda: expected == self.tag_name,
                       timeout=timeout)
Ejemplo n.º 13
0
 def wait_for_size(self, expected, msg=None, timeout=None):
     msg = msg or "element's size never became %s" % (expected)
     return spinAssert(msg, lambda: expected == self.size, timeout=timeout)
Ejemplo n.º 14
0
 def wait_for_location(self, expected, msg=None, timeout=None):
     msg = (msg or "element's location in the renderable canvas never became %s"
            % (expected))
     return spinAssert(msg, lambda: expected in self.location,
                       timeout=timeout)
Ejemplo n.º 15
0
 def wait_for_selected(self, expected=True, msg=None, timeout=None):
     msg = (msg or "element never became " +
            ("selected" if expected else "not selected"))
     return spinAssert(msg, lambda: expected == self.is_selected(),
                       timeout=timeout)
Ejemplo n.º 16
0
 def wait_for_removed(self, msg=None, timeout=None):
     msg = (msg or "element was never removed")
     return spinAssert(msg, lambda: self._dodgy_test_for_element_being_removed_from_the_dom(),
                       timeout=timeout)