def is_value_in_attr(element, attr="class", value="active"):
    """Checks if the attribute value is present for given attribute
    Args:
      element (selenium.webdriver.remote.webelement.WebElement)
      attr (basestring): attribute name e.g. "class"
      value (basestring): value in the class attribute that
        indicates the element is now active/opened
    Returns:
        bool
    """
    attributes = element.get_attribute(attr)
    return value in attributes.split()