Forum Discussion

dhundley's avatar
dhundley
Regular Contributor
2 years ago

Inconsistent VM screen resolutions

The machines that we do TestComplete development on have screen resolutions of 1920x1080. The VMs where TestExecute runs our automation seem to be unable to maintain that setting. We continually have to open tickets with our help desk folks to reset the display settings but eventually they get "off" again and our tests will start to fail because a mouse click is being attempting at invalid coordinates that might now even be off the edge of the screen or overlapped by another part of the UI because the new screen res setting doesn't allow the whole page to be in view. Does testcomplete offer any way to work around this type of scenario? thanks!

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I've had the same issue before. Ensure the VM has appropriate video memory size, and if you use SessionCreator, you can maintain the screen resolution by using the parameter /ScreenResolution:"1920*1080".

     

    • dhundley's avatar
      dhundley
      Regular Contributor

      Thank you for the information. I will pass your ideas onto our internal support group and see what they say about it. I'll update this post when i hear back from them. 

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    TestComplete itself does not provide such functionality.

    If your tests are executed via CI\CD, then you may use command/plugin/etc. that provides display resolution adjustment for your given CI\CD server (e.g.: https://support.smartbear.com/testcomplete/docs/working-with/integration/azure/test-adapter/build-pipeline.html#configure-a-pipeline).

    If your tests are executed locally, you may consider some third-party tool and execute it before your tests (e.g.: https://superuser.com/questions/89302/any-way-of-changing-windows-screen-resolution-via-command-line)

     

  • jrsbr's avatar
    jrsbr
    Contributor

    We had issues with this.  We had to run TestComplete as administrator to enable it to effect resolution changes on the VM host.  Also in line with rraghvani  the VM host has to have sufficient video resources.  A lot of VM hosts have very basic resolutions like 800x600, 1024x768 etc  We did get it working tho.

    • dhundley's avatar
      dhundley
      Regular Contributor

      when you say "run testcomplete <testexecute in my case> as administrator to enable it to effect resolution changes on the VM host" can you elaborate a bit more as to how, exactly, resolution changes can be effected by testexecute? when i'm on my VM (with administrator privileges) i can't even display the resolution settings. 

       

       

       

    • dhundley's avatar
      dhundley
      Regular Contributor

      I tried setting it the way described in the link and that had no effect either. I'm in a conference call with our support desk and the VM software vendor on Thursday. Hopefully, we'll have the answer to this question after that. I will update this post once that meeting has taken place and let you know if we came up with any solutions. thanks for all the suggestions. 

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Check the following settings

     

    If you use a different application to connect to your VM, then you'll have to check the settings.

    • dhundley's avatar
      dhundley
      Regular Contributor

      We don't actually use the basic windows Remote Desktop connection to RDP into our VM's. Rather, its RDWeb (or Remote Desktop Connection Manager v2.7). It's display settings screen looks like this

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        In RDC Manager this is on the Remote Desktop Settings pane: