I am using RFT 8.0 with Java scripts to test a .net application that is using the C1MainMenu Toolbar menu. When I record a script RFT uses:
The problem is the menuPopupwindow is dynamic where the menu items or command links in .net change. This means my atPoint is changing. I tried to use atPath, but that is apparently not supported. I get the following exception:
Exception occurred during playback of script [T003_TCS_cTMS_Commodity_Code_Test] [CRFCN0019E: RationalTestScriptException on line 105 of script T003_TCS_cTMS_Commodity_Code_Test - com.rational.test.ft.UnsupportedSubitemException: List[AtText("User Details")].].
Does anyone know what I need to do to solve this problem?
Thanks for the quick reply. But how do I do this? c1MainMenu1net and menuPopupwindow are already identified as they are test objects. I can perform some methods on them, .click(atPoint) for example. I can also do a .getProperty(), but I'm not sure what property to get.
This is the new feature. While adding the test object, you can make RFT to wait for some time to study the object. For eg. If you want to add submenu item or pop up item , in add Test object wizard , we have a combo item "Time Delay". If you click OK, the cursor will not change to Hand symbol for five seconds. You can navigate to submenuitem within that time. Once the submenuitem opens , you can add that object to the test object repository. It will work instead of clicking at point.
The menu is changing between test runs. Part of this test is validate only certain users can access certain functions. This part of the test uses the app to assign different user roles within the app. The problem is that as roles change the functions they can see from the menu change. Effectively the menu changes as part of the normal functioning of the app under test.
This means I can't use the X/Y coordinates of a menu selections because the selections are changing. This was not a problem with non-.net apps, because I could use the atPath() method to find the menu selection where ever it was. For some reason this method is not available, or I don't know how to uncover it with the .net Component One menus.
I don't think this is a timing issue. I tried this anyhow. In RFT I right clicked Test Objects then Insert Test Object. the Insert a GUI Object into the Object Map dialog box opened. From the dropdown I selected the Time Delay and set it to 10 seconds. When I clicked OK the timer started and I hovered the mouse over the menu item. The Test Object find got the same test object (menuPopupwindow) that was found before. As far as I can tell there are no children or any other new parameters.
I still this error when I try to use the atPath method: com.rational.test.ft.UnsupportedSubitemException: List[AtText("User Setup")].].