Controlling the Test Run with setvar and getvar - WinRunner

You can use getvar and setvar together to control a test run without changing global settings. In the following test script fragment, WinRunner checks the bitmap Img1. The getvar function retrieves the values of the timeout_msec and delay_msec testing options, and setvar assigns their values for this win_check_bitmap statement. After the window is checked, setvar restores the values of the testing options.

t = getvar ("timeout_msec");
d = getvar ("delay_msec");
setvar ("timeout_msec", 30000);
setvar ("delay_msec", 3000);
win_check_bitmap ("calculator", Img1, 2, 261,269,93,42);
setvar ("timeout_msec", t);
setvar ("delay_msec", d);

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

WinRunner Topics