@classmethod
def error_label_containing(cls, text):
    """Returns an XPath to find a Label containing the error message in `text`."""
    return cls('//label[@class="error" and contains(node(),"%s")]' % text)
