I actually have two questions, first of all i'm working on a fat client app, when a user selects a client it redirects them to the main page which all have the basic functions from the drop down menu but their in different orders. File --> <item 2> is exit for one client but File --> <Item 3> is exit for another. My version of QTP doesn't get the context menu names so i have to go by index value.
I was curious I want to have the item numbers in my .vbs global var sheet so in my excel sheet where i'm calling the window function i can enter 'Client1Exit' and it will know to use <Item 2> and 'Client2Exit' and use <Item 3>. I keep getting the QTP error "the item is not found for Toolbar...." Can anyone help me with this. Also is there any way to include a global .vbs file not using the ExecuteFile or loading it into QTP?
Yes you can load a global .vbs library file to QTP. In order to do this go to QTP->Test->Settings->Test Settings->Resources click on the “+” button to add new VB libaary file. This will ask you to browse the .vbs file. Do this it will add the .vbs file for the QTP test. If you want you can click on the “Set as Default” button to Sets the current list of library files as the default list to be associated with new tests.