Can you give us , what actually it says. Is it returning a wrong value or given exception ?
If Nothing works, you can study the object's properties at runtime, there will be some property which remains constant in all runs. For Eg. index property have the value as 1. Take the parent object and find the desired object with this common property.
Are you mapped that Button?? or trying to get the Button by find method?? If you are using find method then use the appropriate property of the button as Voks said either by .index or any property to find the button.
Thank you for your suggestion.
Using "buttonObject.getProperty(".value").toString() " throws me a null pointer exception.
My system under test is as follows:
I have a "Details" button.When i click it, it gives me a screen to enter personal information.when the personal information is saved, the "Details" button changes to the personal information entered in the screen.
For example: The button gets changed to "First Middle Last" (names that i entered in the screen).
Now the .text and .name of the button "First Middle Last"(the button gets changed here) and the index is 0.
I need to validate if the entered personnel information is updated or not.
The second line of the method you suggested also throws me an exception "java.lang.ArrayIndexOutOfBoundsException:"
I have zero knowledge of Java.
plz help me..