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
245
Infragistics toolbar issue
posted

Hi all,

In our company Infra QA team recorded the menu selection action with QTP: click Transaction from main menu, then click Buy menu item. But it failed while the replay in QTP. The QTP did click the Transaction menu but not the Buy menu item.

Here are the codes from expert view mode:

 

SwfWindow("XXX Desktop 8.0.0").SwfToolbar("_XXXForm_Toolbars_Dock_Area").DropdownToolbarTool "newMainMenu","&Transactions"

wait 3

SwfWindow("XXX Desktop 8.0.0").SwfToolbar("_XXXForm_Toolbars_Dock_Area").ClickMenuTool "newMainMenu,&Transactions","Buy|XXX.XXX.Forms.ScreenDataSet.ScreenLauncher,XXX.Forms.ScreenDataSet|Buy"

 

The Error message as below:

IG : The specified Tool [&Transactions,Buy|XXX.XXX.Forms.ScreenDataSet.ScreenLauncher,XXX.XXX.Forms.ScreenDataSet|Buy] does not exist.

Question: Any one have any ideas how to select the menu item, thanks.

Parents
No Data
Reply
  • 7695
    Offline posted

    Hi Dwei,

         I believe the issue may lie in the key name. Perhaps I am wrong, but is looks like you're key name for the buy menu tool is : "Buy|XXX.XXX.Forms.ScreenDataSet.ScreenLauncher,XXX.Forms.ScreenDataSet|Buy"


       First I would try to confirm with your developer that that is the actual key. If it is, I imagine the reason it may be failing is the comma in the key name. Currently the comma is hard coded as a separator and as such it is inadvertently seeing the tool as only XXX.Forms.ScreenDataSet|Buy instead of its full name.

    When in doubt to make it run properly, you could always just switch that argument to an integer, which represents the zero based visible index. So in this case it should be zero. Also so that you remember what it is intending to click you can just leave the existing key as an inline comment by using a single pop quote (') .

     

     

Children
  • 245
    posted in reply to Michael Germann

    Mike , thanks for your reply. We follow you commnet and made more details testing on this problems. FYI please.

     

    Issue One.

    The script of click sub menu 'PopupMenuTool1_2_1' is failed !  But in the process ,the menu ''PopupMenuTool1_2' seems should be successfully detect by the script.

    Issue Two.

    <=

    SwfWindow("Form1_2").SwfToolbar("_Form1_Toolbars_Dock_Area_Top").DropdownToolbarTool "UltraMenuBar","PopupMenuTool1"
    SwfWindow("Form1_2").SwfToolbar("_Form1_Toolbars_Dock_Area_Top").ClickMenuTool "UltraMenuBar,PopupMenuTool1","PopupMenuTool1_1"

    =>

    We try to click the menu of 'PopupMenuTool1_1' it is failed . But it is in the same level with ''PopupMenuTool1_2' , right ?

    In short ,  we think if the target menu in the last sub will make the script failed, and all the dropdown methods works well but always get failed in the line of ClickMenuTool (for this function we also tried to use integer value instead of text string but doesn't work ), do you have any ideas or comment for this ?

    Thank you very much.