Forum Discussion

scsvel's avatar
scsvel
Frequent Contributor
14 years ago

Can I do Click event on my screen using Co-Ordinates

Hi,

Can I do Click event on my screen using Co-Ordinates. I don't want to click on particular object. I want to click on my monitor screen using specified co-ordinates...



Also Can I do click on a object that is not enabled ie. another object is overlapped so that object's exists = true, Visible = true, VisibleOnScreen = true. But Enabled = false. I want to click on this object without closing my overlapped object...



Can you guys help me on this?





Thanks....
  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi
    Shanmugavel,



    > Can I do Click event on my screen using Co-Ordinates.

    Yes, you can. Something like

    Sys.Desktop.MouseDown(...)


    Sys.Desktop.MouseUp(...)



    See relevant help topics for MouseDown/MouseUp description and parameters.



    > Also Can I do click on a object that is not enabled ie. another object
    is overlapped [...]


    Yes, you can click on the disabled object absolutely the same way you are clicking on enabled object.

    Most probably you will not be able to click the object overlapped by some other one just because you cannot do this as an ordinary user. And because TestComplete emulates user's actions it will fail to click such overlapped object as well.