Forum Discussion

sridhar249's avatar
sridhar249
Occasional Contributor
2 years ago

Chrome is not maximized when running a test from QA complete

I am running a test by maximizing the chrome. It maximized the chrome properly if I run the test by doing a remote desktop onto the machine as seen below.

 

 

But, if i run the same test without doing a remote desktop, but run it from QA complete on that machine, then the browser does not seem to be maximized though the command is run to maximize the browser: Sys.Browser("chrome").BrowserWindow(0).Maximize(). Please see the screenshot below.

 

 

 

 

I am using the latest version of testcomplete: 15.54.3.7 and using the latest version of chrome: 115.0.5790.171

Note: This machine used to run the chrome maximized properly couple of weeks ago when run from QA complete. Not sure why it is different now, I don't recall changing anything on the machine.

 

Please help.

  • Both windows look maximised to me, the only difference I see, is that your screen resolution is different (or Zoom).

    Zoomed in

     

     

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Both windows look maximised to me, the only difference I see, is that your screen resolution is different (or Zoom).

    Zoomed in

     

     

     

    • sridhar249's avatar
      sridhar249
      Occasional Contributor

      yes, both windows are maximized. But, why would the screen resolution be different between when logged into the machine remotely and ran the test vs run the test from QA complete? Any thoughts?

       

      Also, I am getting the devicePixelRatio as mentioned here, Testing Pages With Multiple Zoom Levels | TestComplete Documentation (smartbear.com)

      page.contentDocument.defaultView.devicePixelRatio

      and I am getting the value as 1, multiply that by 100 = 100% zoom. This is the zoom value I am getting in both the cases (remote login to the machine, run the test from QA complete).

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    I don't know how you are executing your tests on your remote machine, and I also don't know how your remote machine is setup.

     

    However, I do know that if using SessionCreator you should specify ScreenResolution parameter. The default screen resolution of a remote machine is 1280x800. Your Windows tool bar indicate that it's using a lower screen resolution 🔍

    You can use Sys.Desktop.Width and Height methods to output the screen resolution.

     

    Is QAComplete the same as TestComplete?

    • sridhar249's avatar
      sridhar249
      Occasional Contributor

      Someone removed the monitors connected to the remote machines I was using, that resulted in the change in resolution to: 1024 * 768. I just need to attach some monitor and set the desired resolution: 1920 * 1080