Unable to add a sub menu in to the Object Reposito
I am having a problem with getting a Sub Menu on my web application added into the QTP Object Repository.
The Sub Menu is displayed if you mouse over then main menu item.
If I press the Record button then mouse over the main menu then the Sub menu is displayed, however I am unable to click on it so it is not added to my test script.
If I use Object Spy I can hold down CTRL and then click the main menu item and the focus changes to the sub menu where I can click on the Sub Menu object and the Sub Menu details are displayed in Object Spy, so QTP does acknowledge that it exists.
If I open the Object Repository and click the [Add Objects to Local] button then I can hold down CTRL and click the main menu item and the focus changes to the sub menu where I can click on the Sub Menu object. The Object Selection window is now displayed with the WebElement displayed but when I click the Ok button to add it to the repository the Object Selection window just closes and the object is not added to the repository?
Re: Unable to add a sub menu in to the Object Repo
Happens with dynamic object. Problem is that by the time QTP adds the object and check it properties, the object is already destroyed by the HTML script. This can be easily solved by using Descriptive programming. You though would need to check the HTML source code to see how this can be done