Forum Discussion

kandy1984's avatar
kandy1984
Contributor
11 years ago

how to update click co-ordinates during runtime

Hi,



i had done some keyword tests and TC has recorded the co-ordinates of the object when clicking on the button. When i run the same tests on the next release of my software, it keyword tests fails saying that test fails as the co-ordinates are out of the window bounds. This means that the object that im testing must have moved a tiny bit. Is there a way where TC can automatically update the co-ordinates when running? or do i have to manual change them in the key word test by figuring out the co-ordinates.



Thanks.





  • Are you running at the same resolution?



    With the same text scaling and browser scaling settings?



    Is the browser forced to full screen? (If using browser)



    Is the application forced to full screen (if an application rather than browser) if possible. If not possible, can you move it to a set location.





    Although ... first advice would be ..... don't use co-ordinates. It is a horrible way to identify objects and always prone to fail. Should only be used as an absolute last resort if nothing else works and you have absolutely no other way of identifying something. I will even use key shortcut keypress sequences ahead of co-ordinates ....
  • Hi,



    I am actually dragging the Well Name to the X attribute box and TvdTotal to Y axes box and every time when i want to click on Tvdtotal and drag to the Xattribute, the co -ordinates change and instead of dragging Tvdtotal, it will drag Waterdepth. I will need to change the co-ordinates accordingly. Is there any other way to do this? As you have said, going by the co-ordinates is not a good idea.



    Thanks for helping.





  • I presume when you drag one item out, the second one moves? And there is possibly movement in the column you drag them to on the right?



    I imagine you would best to get the current co-ordinates from each object you're using at run time (they should be available as object properties you can extract) and use those rather than relying on stored or hard coded co-ordinates.



    Co-ordinates are bad. Hard coded ones are even worse ....