Forum Discussion

helpdesk's avatar
helpdesk
Occasional Contributor
4 years ago

Help with Maximize Action Function

Hi all,

 

I am a newbie to test complete and automated testing in general.

 

I am currently setting up a Project Suite for a Desktop application built using microsoft.net, the issue I am finding is within the desktop applications sometimes windows will shrink from being maximised to half screen. Because of this when I run my test project sometimes it will fail as occasionally windows will shrink to half screen. 

 

Please note I am not a coder therefore are using test complete in its most basic format as that is all i know.

 

I did speak with a developer who advised there is a maximize action function which should make the window maximize before moving on to the next test case. 

 

My issue is I dont know how to take this information and put it in place in my testcases, does anyone have any steps for me as i checked https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/window-and-process/maximize-action-window-object.html but it is a bit too technical for me and i worry i may have to code this somewhere but I am unsure where. 

 

If anyone could assist that would be fantastic, I am sure I have forgotten some information so please let me know if you need more info.

 

Thanks 

11 Replies

  • BenoitB's avatar
    BenoitB
    Community Hero

    Do you script, record or do keyword test ?

     

    The action is quite easy

    var myApp = Sys.Process("your application name").Window("name of the main window", "*", 1);
    myApp.Activate();  // To be sure the Windows has the focus and accept control action
    myApp.Maximize();

     

    • helpdesk's avatar
      helpdesk
      Occasional Contributor

      Hi,

       

      Thanks so much for the speedy response. I record, does that make a difference?

       

      Because I record where would i enter this information?

       

      Thanks 

      • BenoitB's avatar
        BenoitB
        Community Hero

        If you record its simple.

        Record the launch of your app, including the click on Maximize button on window top right border.

        And when you'll replay it will click on it.

         

        If you're not confident in, please post the code of record of the app launch and we'll modify it.