Forum Discussion

mustafayol's avatar
3 years ago

Do I really need the coordinates when I click on an item?

Hi friends,   I am testing windows desktop software. During the tests I use "record and play" method,  and click on certain buttons within the scenario.   appTextBoxMaskBox.Click(2, 5); appText...
  • hkim5's avatar
    3 years ago

    ideally, you should never have to rely on coordinates when you perform Click() operations on your objects.

    Given that Testcomplete can uniquely identy the objects themselves (easy way to tell is take the object spy and see if it creates a red rectangle around whatever object you want to interact with)

    then you do not need the coordinates parameters within your Click operations.

    the reason for those being recorded may be that TC wants to be as accurate as possible when transcribing your recorded actions, but it is definitely not necessary in alot of cases.

    you can edit it to be blank, or call on default coordinates (with is dead center of the object -1, -1)

    so that would be



    testedObj.Click(-1, -1)