Forum Discussion
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/message
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.
- Marsha_R3 years agoModerator
What happens when you try it?
- sathashiv53 years agoContributor
It works.
Related Content
- 14 years ago
- 13 years ago
- 6 years ago
Recent Discussions
- 17 hours ago