cancel
Showing results for 
Search instead for 
Did you mean: 

Help with Maximize Action Function

helpdesk
Occasional Contributor

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/ma... 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 11
BenoitB
Community Hero

Re: Help with Maximize Action Function

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();

 

Un sourire et ça repart

helpdesk
Occasional Contributor

Re: Help with Maximize Action Function

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
Community Hero

Re: Help with Maximize Action Function

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.

 

 

 

 

Un sourire et ça repart

helpdesk
Occasional Contributor

Re: Help with Maximize Action Function

Hi,

 

Thanks for the reply, unfortunately the maximise button disappears sometimes and therefore I cannot click it to expand the window, typically I will need to click around the application to try and maximise and because it happens randomly and not all the time im just not sure how I can get this to work using the recording function

 

Thanks 

BenoitB
Community Hero

Re: Help with Maximize Action Function

Please share the code snippet of the record of launching app.

We'll add the maximize action.

 

But be aware, in one week you must leave Record and start Scripting or Keyword !

Un sourire et ça repart

helpdesk
Occasional Contributor

Re: Help with Maximize Action Function

Hi,

 

How do I send you the code snippet?

 

Also are you saying that TestComplete will be stopping the recording functionality in a new update?

 

thanks 

BenoitB
Community Hero

Re: Help with Maximize Action Function

Just copy and paste it here 😉

 

No, TestComplete won't remove the Record option .. but this is a unmaintenable way of doing automation seriously. After one week of using TestComplete you will improve your skills and vision and you'll understand that you must work in a different manner 😉

 

Un sourire et ça repart

helpdesk
Occasional Contributor

Re: Help with Maximize Action Function

Hi,

 

Thanks for that information, yes I can already tell I will run into issues with the scripting side of things so will need to expand on my knowledge.

 

Below is the information you have requested. 

 

utcNetTabs ClickTab "Quotes" Selects the 'Quotes' tab of the 'utcNetDentTabs' tab control.
zNetMDI_Toolbars_Dock_Area_Top ClickItem "Patient|Quotes|New", ... Clicks the 'Patient|Quotes|New' item of the 'zNetMDI_Toolbars_Dock_Area_Top' bar.
ugBillDetail ClickCellXY 0, "Practitioner", 110, 14, ... Clicks the 'ugBillDetail' grid cell. Row: 0, column: 'Practitioner'.
ValueListDropDown DblClick ... Double-clicks the 'ValueListDropDown' object.
ValueListDropDown Click ... Clicks the 'ValueListDropDown' object.
ValueListDropDown Click ... Clicks the 'ValueListDropDown' object.
ugBillDetail ClickCellXY 0, "Item Number", 55, 10, ... Clicks the 'ugBillDetail' grid cell. Row: 0, column: 'Item Number'.
ugBillDetail Keys "011[Enter]" Enters '011[Enter]' in the 'ugBillDetail' object.
ugBillDetail ClickCellXY 1, "Item Number", 55, 4, ... Clicks the 'ugBillDetail' grid cell. Row: 1, column: 'Item Number'.
ugBillDetail Keys "012[Enter]" Enters '012[Enter]' in the 'ugBillDetail' object.
ugBillDetail ClickCellXY 2, "Item Number", 48, 6, ... Clicks the 'ugBillDetail' grid cell. Row: 2, column: 'Item Number'.
ugBillDetail Keys "014[Enter]" Enters '014[Enter]' in the 'ugBillDetail' object.
ubSave_Pay Click ... Clicks the 'ubSave_Pay' object.
ubPaymentType Click ... Clicks the 'ubPaymentType' object.
btnNo ClickButton Clicks the 'btnNo' button.
btnOK ClickButton Clicks the 'btnOK' button.
ubClose ClickButton Clicks the 'ubClose' button.
zBaseForm_UltraFormManager_Dock_Area_Top Click ... Clicks the 'zBaseForm_UltraFormManager_Dock_Area_Top' object.
zNetHealthMDI_Toolbars_Dock_Area_Top ClickItem "Patient|Quotes|View Payment", ... Clicks the 'Patient|Quotes|View Payment' item of the 'zNetMDI_Toolbars_Dock_Area_Top' bar.
zBaseForm_UltraFormManager_Dock_Area_Top Click ... Clicks the 'zBaseForm_UltraFormManager_Dock_Area_Top' object.
zNetMDI_Toolbars_Dock_Area_Top Click ... Clicks the 'zNetMDI_Toolbars_Dock_Area_Top' object.
zBaseForm_UltraFormManager_Dock_Area_Top Click ... Clicks the 'zBaseForm_UltraFormManager_Dock_Area_Top' object.

BenoitB
Community Hero

Re: Help with Maximize Action Function

Hmm this is not the launching of the app no ? Looks like this is a code snippet after the launching.

Need to find the parent of zBaseForm_UltraFormManager_Dock_Area_Top certainly.

And add before next step the Maximize action

 

Un sourire et ça repart

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors