To operate on a label object and based on your requirement, you can use any of these functions
getlabel - Get label of an object
getlabelatindex - Get label at the specified index in a window
selectlabelspanelbyname - Select the labels based on panel name
Linux Desktop Testing Project