I'm kind of confused here with the values that QTP (9.5) returns using these methods. For example, I have an Execute button (JavaButton) that I need to know the sate of (enabled or disabled). When I spy the button, the RO properties show the value of 'enabled' to be 'true'. The TO properties show the value to be '1'. This makes sense. Some test code gives different values than I would expect:
Thanks. Does it seem odd that RO returns '1' and when you spy it the value is 'true'? Spying a value on an object isn't always the same as a return value. Just have to figure out which ones do and which ones do not. Thanks for your info.
It(my statement) actually does not interpret the failure from the Obj spy to capture the properties, but time of capturing the properties by the automation tester.
Usually Obj spy is used when the application is in static mode, whereas the same obj may change the state during runtime, but here again if the tester captures the property after the change then yes Spy gives the runtime property.
Its relative to the "time" of capturing the property.
Hi, [ QUOTE ]
a=-1 or a=2 or a=9: all will return true
[/ QUOTE ]
Yes, well ... sort of. I think the vbs implementation is actually using 'if not false' logic where zero is false. You can search http://blogs.msdn.com/ericlippert for vbs trivia.