Forum Discussion

abdul_rp's avatar
abdul_rp
Contributor
14 years ago

Verification StripMainMenu's items



Hi,



I want to verify the submenu items of the StripMainMenu in runtime and I am facing the weird problem  the scenario is as follows:



Initially I am taking the count from Submenu



Form["StripMainMenu"].Items("View").SubMenu.Items("Charts").SubMenu.Count



Eg:The Count is 2 at first instance



In run time after creating charts(Performing some operation) the count of the submenu item  will be incremented by 1 , I am seeing 3 items in Submenu in the StripMainMenu,but the Tool shows its count as 2 . I have used delay and other wait options after performing the action in runtime but it didn't work.

Can any one suggests me what will be the problem?.



Regards,

Abdul Rahim

  • Hello Abdul Rahim,





    I tried to reproduce the problem with a sample WinForms application, but failed. In the sample application, I am adding items to a submenu within the Button.Click event handler using code like this:





    chartsToolStripMenuItem.DropDownItems.Add(" new item");





    For me, TestComplete returns the correct value of the SubMenu.Count property. 





    Could you please create a sample application, so that we can reproduce the problem with it? Also pack the whole folder of the project suite with the problematic script and test logs and send me the archive.