Hi All,
I jave one query.I need to identify total number of buttons on a particular window.If anybody is having the idea regarding the same,plz let me know.
Hi Ketan,
You can acheive it by creating Description object.
I have not done it on SAP, so posting the code for Web. You can customize the code and try on SAP
Quote:Set wButton = Description.Create
wButton("micclass").Value = "WebButton" //Here instead of micclass you can use any other property that SAP has for buttons and replace WebButton with the name QTP gives to SAP buttons
Set wButtonAll = Browser("BrowserName").Page("PageName").ChildObjects(wButton) //Makes list of all the buttons present under the hierarchy
Msgbox wButtonAll.Count //Give you the total number of buttons
Hope it will help you