1. Debug Mode
2. Verify Mode
3. Update Mode
Table of Contents
Showing posts with label WinRunner. Show all posts
Showing posts with label WinRunner. Show all posts
Wednesday, September 22, 2010
Recording Modes in WinRunner
1. Context Sensitive Mode
2. Analog Mode
2. Analog Mode
Commands of WinRunner
Statements in Context Sensitive Mode
invoke_application("Notepad","","c:\\temp",SW_SHOW);
set_window("Login",10); Waits for the specified window to appear on screen. If the window appears before the timeout, the script immediately proceeds to the next line.
button_press("OK") ;
button_set("Order","ON")
win_activate
invoke_application("Notepad","","c:\\temp",SW_SHOW);
set_window("Login",10); Waits for the specified window to appear on screen. If the window appears before the timeout, the script immediately proceeds to the next line.
button_press("OK") ;
button_set("Order","ON")
win_activate
win_exists("Flight Reservations",2)
list_get_num_items
list_get_num_items
list_select_item("Make","BMW");
edit_set("User ID:","guest");
edit_set("User ID:","guest");
password_edit_set("password","mxpvnwoulxjxau");
edit_get_text
menu_select_item("File;Openn Order");
GUI_close_all();
GUI_close("");
GUI_load("X:\\guimaps_myguifile.gui");
edit_get_text
menu_select_item("File;Openn Order");
GUI_close_all();
GUI_close("
GUI_load("X:\\guimaps_myguifile.gui");
Synchronization Statement
Object Synchronization Statements
win_wait_info("Payment","enabled",0,30);
obj_wait_info("StatusBar","label","Done",20)
Time Synchronization
wait(10) ; waits for the specified amount of time
Bitmap Synchronization
obj_wait_bitmap("Object","Img1",10)
win_wait_bitmap("Screen","Img2",10, 210, 175, 80, 22)
GUI Checkpoints
Verifies whether object's properties match with the expected results. Checkpoint differs depending on the object to be verified.
For Example:
Single Property check GUI checkpoints
List Box control - list_check_info
Button control (check box, radio button, push button) - button_check_info
Generic Object - Obj_check_info
Window - Win_check_info
Multiple Property check GUI checkpoints
obj_check_gui("progressbar","list1.ck1","gui1",25);
win_check_gui("Report","list1.ck1","gui2",4);
obj_check_gui("progressbar","list1.ck1","gui1",25);
win_check_gui("Report","list1.ck1","gui2",4);
Bitmap Checkpoint statements:
obj_check_bitmap("progressbar","Img1",25);
obj_check_bitmap("statusbar","Img2",25,0,10, 50, 10);
win_check_bitmap("Reports","Img3",4);
Text Checkpoint statements
obj_get_text("Statusbar95",text) ;obj_get_text: retrieves the text within an area
Database Checkpoints
db_check("list1.cd1","dbvf1");
Log Statements
tl_step: lots message in the WinRunner report and changes test status
if (text == "Insert Done...")
tl_step("Check statusbar","Pass","Insert was completed");
else
tl_step("Check statusbar","Fail","Insert Failed");
Statements in Analog Recording Mode
move_locator
move_location_track(1);
move_locator_abs
move_locator_abs
type("ls\-l");
Analog Synchronization
win_wait_bitmap("Win_1","icon_editor",4, 855, 801, 190, 80);
win_wait_bitmap: waits for a window bitmap to appear onscreen. Bitmap may be full/partial window area. Optionally, bitmap filename may be omitted, thus synchronizing on window refresh/redraw.
Subscribe to:
Posts (Atom)