Forum Discussion

seafalcon's avatar
seafalcon
Contributor
15 years ago

changing desktop's definition resolution will affect exiting test scripts which contain coordinates?

changing desktop's definition resolution will affect exiting test scripts which contain coordinates?




Thanks

1 Reply

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3
    Hi Philip,



    It depends.

    In general, (almost?) all TestComplete methods that use coordinates are working with the coordinates that are relative to the top left corner of the relevant object. So, the script should not be affected if the object's size does not change with the screen resolution. Hovewer, if the object changes its size and the new size appears to be smaller and, as a result of this change, coordinates appear to be out of the object boundaries, in this case the script obviously will fail.

    It is possible to remove coordinates from the method parameters (i.e. change obj.Click(15, 20) to obj.Click() ). In this case TestComplete will perform click in the middle of the object and removing coordinates is the preferred method if your test does not require clicking on exact coordinates.