code: def get_element_attribute(self, locator, attribute):
          
          elements = self._element_find(locator, False, True)
          ele_len = len(elements)
          if ele_len == 0:
              raise AssertionError("Element '%s' could not be found" % locator)
          elif ele_len > 1:
              self._info("CAUTION: '%s' matched %s elements - using the first element only" % (locator, len(elements)))
  
          try:
              attr_val = elements[0].get_attribute(attribute)
              self._info("Element '%s' attribute '%s' value '%s' " % (locator, attribute, attr_val))
              return attr_val
          except:
              raise AssertionError("Attribute '%s' is not valid for element '%s'" % (attribute, locator))
docs: Get element attribute using given attribute: name, value,...
  
          Examples:
  
          | Get Element Attribute | locator | name |
          | Get Element Attribute | locator | value |