Reputation: 83
I am using RTF (.Net) to write test scripts for an application created in VC++. In this VC++ application there is a Menu Item 'View', under which there is a sub menu item 'ConView'. The ConView is set the 'enabled' True at the design time and then at runtime it is set to False or True depending on some other values in the app. So, the sub menu item ConView could be enabled or disabled at runtime.
When I create the test object of the sub menu item using RFT, the .enabled property of the ConView is always TRUE even though it is actually disabled.
Questions - Does RFT consider the property value that was set at the design time and not consider anything changed at the runtime?
How do get the actual property of the submenu item by using RFT.
Thanks.
Upvotes: 0
Views: 750
Reputation: 260
1 Can you please provide your code?
2 Try yoursubitem.isShowing(). I also think that yoursubitem.isEnabled() is the wrong method.
3 Call the method yoursubitem.getProperties(): I think it should return a hashmap. Set a breakpoint there and you can see all the properties of yoursubitem. Look there for further possibilities to check out the state of yoursubitem.
Upvotes: 0
Reputation: 1240
I have only experience using the Java edition of RFT to test Java and web applications. Given this setting, the property values change at runtime.
Could it be that in your case not the .enabled property changes at runtime but some other property? You can find out the values of all properties when you start to create a properties verification point for your object (when you are asked to select the properties to be included in the verification point). Just cancel the creation of the verification point (since you are only interessted in looking at the available properties and its values), then create a new properties verification point when the state of your object has changed—hopefully some property changed as well and can be used as an indicator to determine the state of your object.
Upvotes: 0