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)
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)
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)
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)
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)
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)
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)
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)
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)
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)