I want to get some information about GetToProperty method. My requirement is to get the value of a property (say the value of the property 'disabled' which can be 0 or 1) and according to the value returned the script should function accordingly.
I am using the following syntax
result = Browser("...").Page("...").WebButton("ProcessData" ).GetTOProperty("disabled")
My question is
1) Should I include the 'disabled' property as one of the selected property in the Object repository? The default properties that are selected are type, name, htmltag. This can be viewed under tools -> object repository and select the object that has to be viewed. Please see the attached snapshot.
2) This property only has two values 0 or 1, and when recording it, it can be either 0 or 1 depending on the state in which I am recording the object. Should I use regular expressions in this case where during run time the property value can be picked as per the state? If yes please give a explanation.
Also, I tried to not to add ‘disabled’ as one of the identified property. I just used the default properties type, name, htmltag but when executing a Run Error occurred stating ‘invalid syntax or parameter value’
Use GetROProperty instead of GetTOProperty
Use "GetROProperty" .
And when you are using this "GetToProperty" u must select disabled property in OR.