Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Create List of all menu items
#1
Solved: 11 Years, 4 Months, 2 Weeks ago
How can I create a list of all the menu items and subitems in an application?
Reply
#2
Solved: 11 Years, 4 Months, 2 Weeks ago
Hi,

For example you have many roles in the menu item, may be drop down box or something like tht.
You can use following code.
Following code will gove you all the items inside the drop down box.

Code:
Set objChild = Description.Create()
objChild("class").Value = "role-menu-item"

Set objChildWebTable  =  Browser("Search Patients").Page("Search Patients").WebTable("Role_WebTable").ChildObjects(objChild)

Dim arrUserRoles()
If objChildWebTable.Count <> 0 Then
ReDim arrUserRoles(objChildWebTable.Count - 1)
    For intCount = 0 To objChildWebTable.Count - 1
        arrUserRoles(intCount) = objChildWebTable(intCount).GEtROProperty("outertext")
    Next
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Unable to perform click operation on MDI menu/sub menu (Infragistics) with UFT 12 Mahen1108 0 3,466 06-17-2015, 05:29 PM
Last Post: Mahen1108
  create drop Down list or menu in qtp abansal 0 3,983 09-07-2012, 05:36 PM
Last Post: abansal
  Unable to select items from WebLists CosmaShiva 8 7,248 07-23-2012, 06:23 PM
Last Post: Tarik Sheth
Rolleyes To Get number of menu items of a winmenu object sasmitakumari 0 6,396 07-08-2010, 02:56 PM
Last Post: sasmitakumari
  Menu and Menu Item Identification Girish_Pai 1 3,704 11-04-2009, 01:58 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)