Ask a Question

Validating Web browser Maximize and Minimize

sathashiv5
Contributor

Validating Web browser Maximize and Minimize

Hi,

 

How to validate the web browser whether it gets Maximized or Minimized?

4 REPLIES 4
Marsha_R
Community Hero

You can try using Maximize or Minimize and then check the position of the window.  If that's not sufficient, I'd check with Support to see what happens if a Maximize or Minimize fails.   

 

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/window-and-process/ma...

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/window-and-process/mi...

https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/window-and-process/po...

 

https://support.smartbear.com/testcomplete/message

 

 

 

 


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

Can below code works for validation? I am using this snippet for validating desktop application.

 

var pObj = Sys.Browser("chrome");
var wObj = pObj.BrowserWindow(0);


//wObj.Maximize(); //to maximize
var getWndStyles = wObj.WndStyles;
var WS_MAXIMIZED = 0x1000000;
if((getWndStyle & WS_MAXIMIZED ) == WS_MAXIMIZED )

{

Log.Message("Maximized");

}

else{

Log.Message("not Maximized");

}


//wObj.Minimize(); //to minimize

var getWndStyle = wObj.WndStyles;
var WS_MINIMIZED = 0x20000000;
if((getWndStyle & WS_MINIMIZED ) == WS_MINIMIZED)

{

Log.Message("Minimized");

}

else{

Log.Message("not Minimized");

}

 

 

Meanwhile, I will check using Position Action.

What happens when you try it?


Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame

It works.

 

cancel
Showing results for 
Search instead for 
Did you mean: