Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #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)