Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
175
Swftoolbar getting error message
posted

QTP 9.1

Net/TestAdvantage 2007vol2.clr2.

when writing below code its showing error message.

SwfWindow("Personify: NASE").SwfToolbar("_MDIMain_Toolbars_Dock_Area_To").GetItemsCount

Error message: Invalid Procedure call or argument.

Please suggest me whats wrong with this statement and suggest me correct statement.

Thanks..

Bipender

Parents
No Data
Reply
  • 7695
    Offline posted

     Hi Bipender,

        GetItemsCount requires an argument. That Argument is a representation of the Toolbar, either the index for it or the key. And it returns the number of items on the Toolbar. As with any action that returns a value, you must have parenthesis around the argument(s), so an example in your case may be:

    set dockArea =  SwfWindow("Personify: NASE")SwfToolbar( "_MDIMain_Toolbars_Dock_Area_To")

    MSGBOX dockArea.GetItemsCount("RootMenu")

    - or -

    count = dockArea.GetItemsCount(0)

    I guess it depends on what you are trying to get the count on. 

     I hope this answers your question to your satisfaction,

Children
No Data