We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
Vijay,
Every test object that corresponds to a window or control contains the Click method that simulates a mouse click at object-specific coordinates. Test objects that correspond to specific control types (buttons, list views, list boxes, etc.) contain specific methods for simulating mouse clicks on an appropriate object (like ClickButton, ClickItem, etc.).
You can record a test with your application and look at the recorded test commands to see how TestComplete simulates mouse clicks. See also http://smartbear.com/support/viewarticle/14061/ and http://smartbear.com/support/viewarticle/12560/ in TestComplete help.
Vijay,
I see. The MouseDown method is available only for the Desktop object. As you said, this method works with screen coordinates. You need to convert window coordinates to screen coordinates before calling this method. For the conversion, use the http://smartbear.com/support/viewarticle/15023/ method of your window object.
...
Set pointObj = MyWindowObject.WindowToScreen(10, 10) ' Convert coordinates
Call Sys.Desktop.MouseDown(VK_LBUTTON, pointObj.X, pointObj.Y) ' Call the MouseDown method
...
First of all... this thread is 7 years old... Might be better to have posted your own question since there is no guarentee, after 7 years, that the original people are still around.
That said... Since you're using the Desktop object MouseDown method, you have the wrong number of parameters. See https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/desktop/mousedown-method-desktop-object.html
Remove the ms parameter and you should be good.