I am trying to read text using GetText Attribute from Label/DropDown Lists.
I am able to read the texts which is selected.
For Ex. Label contains “UserName1” and
Dropdown lists highlights “Item1” which can extract “UserName1” and “Item1”
But if the label got changed to “userName2” it is not getting the text from the label instead throws error as “Unable to find the element”
In short I have to create a generic script to extract text from Labels, Dropdownlists, textbox, etc., even if the texts got changed in the element