Interview Questions

WinRunner: How to determine which window you are on:

Mercury WinRunner FAQ


(Continued from previous question...)

WinRunner: How to determine which window you are on:

Each time a new browser window appears, you need to test to make sure the correct window is activated. to do with use the following code:
#test to make sure on browser
win_check_info("Browser Main Window_1","enabled",1);
# check to make sure the menu says Menu Selection
menu = obj_check_gui("title_shad", "list5.ckl", "gui5", 5);
if (menu == 0)
report_msg("On Menu Window");
else
{
report_msg("not on right window");
texit:
}

(Continued on next question...)

Other Interview Questions