Forum Discussion

MegO's avatar
MegO
Contributor
7 years ago

Has anyone had any joy creating and running tests on different size monitors

Hi all,

 

My colleague and I are responsible for creating and running tests in TestComplete for our Desktop application.

 

The problem we face is that we both have different size monitors/Laptops with different resolution etc.

 

This means that tests created on one don't reliably work on the other.

 

Has anybody else faced this issue and how did they solve it?

 

Any ideas or suggestions would be greatly appreciated.

 

 

  • I can't find the specific article at this moment... but I know that it's documented in the TestComplete documentation that, in order for tests to run consistently, the scaling needs to be the same on all environments.  So, you CAN run on different resolutions just fine... we do it all the time.  However, you need to make sure that the scaling is the same on all environments.  The resolution size (1024x768 versus whatever) is immaterial.... it's the scaling that is causing your issue.  Correct that, as documented, and you should be fine.

17 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    We do have same short of scenarios with Java applications.

     

    The main problem for us is scrolling.

    When i was developing scripts for my AUT with big monitor i never seen any scroll bars in it.

     

    Then i ran in the small size monitor it doesn't worked since it is not able scroll by own to see the objects.

     

    By that time, I used to create scripts to handle that scrolls as well to cut off the false failures 

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    First of all - why your tests depend on screen resolution? Are you using image based tests or clicking by coordinates or may be something else?

     

    The best practice requires that tests were independent from infrastructure changes.

    • MegO's avatar
      MegO
      Contributor

      Hi baxatob,

       

      We use the click and record functionality of TestComplete for the majority of our tests. We replace click co-ordinates with -1, -1 as advised to click on the centre of an object rather than rely on the co-ordinates. Our Name mapping is dynamic (Using wild cards, AutomationIds etc)so that objects can be identified no matter where they are on the screen.

       

      The errors we usually see are "There was an attempt to click out of the windows bounds". The Tests run correctly when run on a laptop but fail when ran on a larger monitor. 

       

      It looks like the pixel difference is the cause of the issues...

      • shankar_r's avatar
        shankar_r
        Community Hero

        The errors we usually see are "There was an attempt to click out of the windows bounds". The Tests run correctly when run on a laptop but fail when ran on a larger monitor. 

         

         

        This was the error we also used to get. Mostly it is related the scroll or object displayed partially on the screen when you run in small screen. 

         

        baxatob correctly pointed, Automation scripts should always  in-dependent from infrastructure.