Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
13 years ago

Inconstent behavior on ClickR

I have an object on my screen called CommandBars. (This is a VB6 app with Xtreme Suite controls. CommandBars is one of the XTreme Suite controls.) I wrote some script



  grdStatus.Row = STATUS_1MAN_INDEX   ' put the cursor on the right row

  set cb=frmStatus.WaitVBObject("CommandBars", 4000)                       

  grdStatus.ClickR

  set mnu = cb.FocusedCommandBar  ' trying to get the popup menu for the grid row right clicked upon.





So I was fiddling with this. It worked. The grid would receive a click where it was. Over the course of the evening, the VM I was working on ... died a horrible fiery death. So I put my code on a different VM.



I start debugging some stuff, and come up with an error here. Turns out that the right click is now moving the cursor to another row in the grid. Help for OnscreenObject.ClickR (since it does not seem to be one of the other object). The help file indicates that in the absence of coordinates, the click will be simulated in the center of the object.



Well whoa there nelly. The position of the row I want right clicked upon has not changed. It certainly was never in the center of the grid object.



Note that the grid in question is a Janus GridEX.



I really need a way to click and right click at the current cursor position since most of my objects are not supported by Test Complete! I can usually get the cursor where I need it using native object properties and methods. But I need to be able to issue clicks and right clicks there for the underlying click handlers to fire.



Help please!



n.b test Complete 7.




14 Replies