Forum Discussion

Ravik's avatar
Ravik
Super Contributor
13 years ago

How to get caption of the popup menu & Sub menu

How to get caption of the popup menu & Sub menu for web Application (it's same like window application, example mantain below)



(


Sub MenuSample1



' Obtains the Notepad main menu



Set MainMenu = Sys.Process("Notepad").Window("Notepad", "*").MainMenu



' Defines the total number of main menu items



Count = MainMenu.Count



' Iterates through the menu items



For i = 0 To Count - 1



' Obtains the menu item



Set Item = MainMenu.Items(i)



' Posts the item caption to the test log



Log.Message Item.Caption



Next



End Sub)



============

same thing want to get for web application, Please guide me.



Thanks

Ravik


2 Replies

  • Ravik's avatar
    Ravik
    Super Contributor
    Hi Tanya,



    I want to be get the count and caption all the menus are available in my web application.

    Actually what happen, in our application some menus get hide or some get displayed on the basis of few condition.(I can say that, menus are displayed dynamically), So I want to get all munes and there Caption. (same like example mention above - it's gives the all menus name available in Notepad).



    Could you please help us to how can we does this.



    Thanks

    Ravik