Forum Discussion

ccwhite71's avatar
ccwhite71
Occasional Contributor
13 years ago

Dealing with x,y mouse clicks with different resolution

I made several tests that recorded x,y mouse coordinates for the click.  When I move the test to a different machine that has a different monitor resolution the x,y no longer maps correctly.  



What is the normal way to address this?

12 Replies

  • ccwhite71's avatar
    ccwhite71
    Occasional Contributor
    I tried using keys, but it won't cycle through the select-able objects using keys :(



    I talked to one of the code types and they said that the graphic shapes come from a common java library called ilog jview.  Does this help at all?

  • Hi Chris,





    I believe the shapes you're talking about are just images drawn in a single window, so it's expected that TestComplete cannot recognize them as separate objects. So, it looks like you'll have to use coordinate clicks to perform the actions you need. However, you can try making the test more reliable via evaluating the coordinates dynamically instead of using hard-coded coordinate values. As I understand, your application is created in Java. If so, TestComplete should recognize native properties, methods and fields of the corresponding controls. Try finding properties/methods, which contain some information on the shapes you're talking about. It's possible that you will be able to get the needed coordinates via methods or properties of the corresponding control which renders the shapes.