Forum Discussion

sheetalhir's avatar
sheetalhir
Established Member
5 years ago
Solved

Control Click using cordinates

How to click on a control using coordinates .

In codedui we get the control .Then do Mouse.click(new point(control.x,control.Y).

Is there a similar method in testcomplete .

  • Hi,

     

    In TestComplete You are able to map Your control into NameMapping Repository and use .Click() method on it without coordinates.

     

    example:

     

    button.Click()

     

    You can also refer to this object by using Sys. object

     

    Spy object -> add it into nameMapping repository -> use its properties and methods.

2 Replies

  • Wamboo's avatar
    Wamboo
    Community Hero

    Hi,

     

    In TestComplete You are able to map Your control into NameMapping Repository and use .Click() method on it without coordinates.

     

    example:

     

    button.Click()

     

    You can also refer to this object by using Sys. object

     

    Spy object -> add it into nameMapping repository -> use its properties and methods.

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Wamboo has the right steps.  In TestComplete, you have the more accurate way of addressing the objects by name.  Coordinates can change from machine to machine or even on one machine if the setup or page is changed.  Using the name will make your tests much more accurate and portable.