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
120
How to select context menu item of ultrawingrid row
posted

Is there any other way round to select the context menu of swftable row except the following conventional code generated by QTP

Swfwindow("A).Swftable("B").RightClick "1","0;col_name"

Swfwindow("A).SwfToolbar("T").Select "menu_item"

Problem using this code is that the drop down menu that appears on right clciking keeps sticking on the screen and doesn't go away even after menu item has been selected.

At times it shows some other erratic behavior as well like it always select 3rd menu item in the context menu irrespective of what has been mentioned in Select.

Is there any workaround for this problem? is there any way that contextmenu class of ultrawingrid can be used to directly select the right click item?

Looking for any quick help on this issue as this is causing all of my scripts to fail.

Thanks,

Harsh Pruthi

  • 1040
    posted

    In our applications, there are times when I have to put a Wait statement between the lines of code for the "RightClick" and the "Select" to allow time for the Context Menu to display properly and another Wait after the "Select" to allow time for the Context Menu option to perform its intended function as QTP sometimes runs faster than the app.

    Also, at one point, we had to use the SendKeys method in order to select some options in the context menu, but a Hotfix for our version of TestAdvantage (2006 Volume 2 CLR 1.x) took care of that problem (see related post: http://community.infragistics.com/forums/t/26942.aspx).

    I hope this helps!