WinRunner: How to test to see if the window is maximized

WinRunner: How to test to see if the window is maximized

If we want to test to see if the window is maximized here is a sample of how to code it. This code would be best used in the start up script of any automation project.

#first grab the windows handle for the netsoft elite window

win_get_info(\"Browser Main Window \",\"handle\",value);

#now test to see if window can be maximized

if(win_check_info(\"Browser Main Window \",\"maximizable\",FALSE)!=E_OK)

{

#Now run maximize function and pass in the handle\'s value

if (is_maximized(value) == E_OK)

{

report_msg(\"Ran Max window test and maxed the window\");

win_max(\"Browser Main Window \");

}

else

{

report_msg(\"Ran Max window test and did not have to do anything\");

}

}

# end of script 


By:UMANG
Date:2003-02-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related TESTING Subjective Links

TESTING Subjective interview questions and answers for experienced and fresher