API UIObject GetObjectType

Returns the object's widget type. type = UIObject:GetObjectType

Returns

 * type: string - The name of an widget type, e.g. "Frame" or "Button".

Example
/dump CreateFrame("Button"):GetObjectType -- "Button"