Forum Discussion

nifepo's avatar
14 years ago

Can TestComplete ignore "Screen Coordiantes" to perform button actions ?

Hello, 



Is there any way to make TestComplete forget about screen coordinates for each action?



"

The window size is (1, 1); screen rectangle: the left top corner is (0, 104),
the right bottom corner is (0, 104).

The screen coordinates of the point is
(0, 104).



Aliases.IEXPLORE1.pageGoogle1.BUTTON.Item("btnG")

"



In other automated tools while they also save screen coordinates for each action made, it is not a mandatory step the script follows.



QTP for instance, saves that information but don't use it. QTP script recognize the object by it's hierarchy tree and perform the action wherever the button is placed at that moment (without taking into account the screen coordinates).





Is it possible to do this with Test Complete?





Thanks in advance for your help.



Regards,



Nicolás
  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Yes, TC does this as well. If the object is resolved by TC based upon hierarchy and is recognized as an object and not just a point on the screen (there are limitations as to what TC can recognize... please see the documentation), then you can click on the object.  If you're recording includes "Click(4,10)", you can simply remove the co-ordinates from the call and the object will be clicked in the middle.
  • Buldog's avatar
    Buldog
    Occasional Contributor
    Hi,

    I want to click() on the menu item with specific innerText value. I get the same error anyway, even if the click() coordinates are empty

    Object tree type "DOM".



    The window size is (1, 1); screen rectangle: the left top corner is (0, 80), the right bottom corner is (0, 80).

    The screen coordinates of the point is (0, 80).
  • Anonymous's avatar
    Anonymous

    Hi Buldog,



    Julia - one of our tech writers - has posted a reply to you here.