How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

    another page on this site Tester another page on this site Software Testing another page on this site WinRunner

    Reload this page Standard WinRunner Functions

    This helps me select functions quickly by type of object and then by purpose. Add the function prefix to the suffixes inside each cell.

    I am working now to create sample scripts that demo these functions in use.

    Those who help me with it will obtain the complete suite free. Email me.

 

Topics this page:
on this page OS Functions
on this page File Functions
on this page COM Functions
on this page Window Functions
on this page Text Controls
on this page Navigation Controls
on this page Special Controls
on this page String Functions
on this page CSO Libraries
on this page Custom Controls
on this page Function Libraries
on this page Generic Custom Functions
on this page Naming Conventions
on this page Your comments???

 

Site Map List all pages on this site 
About this site About this site 
Go to first topic Go to Bottom of this page


Related Topics:
another page on this site Framework Keywords 
another page on this site GUI Controls 
another page on this site WinRunner Architecture 
another page on this site TSL Coding 
another page on this site Testing Frameworks 
another page on this site Transition Testing 
another page on this site LoadRunner 

Go to top of page OS Functions

    Category Function Notes Source
    CSOLIBX dos_system_x - fixes the return value in dos_system (has only been tested on NT)
    CSOLIB2 get_win_ver - retrieves the Windows OS version including build number and service pack
    get_comp_name - gets the name of the computer
    keybd_type - types a string using the keybd_event API function. It works similar to the type command
    get_screen_res - returns the current x and y resolution of the screen
    CSOLIB1 get_computer_name - Returns the name of the computer which is logged on to the computer system
    get_user_name - Returns the name of the user as specified in the network settings of the computer"
    CSOLIB2 get_free_mem - returns the percentage of memory in use and assigns args free memory of various types in bytes
    CSOLIB1 beep - Makes a beep sound through the internal speaker
    message_beep - Makes a beep sound through the default sound system.
    CSOLIB1 get_short_date - Retrieves the current date in the format mm/dd/yy
    adjust_short_date - Retrieves the current date, plus or minus days specified in the format mm/dd/yy. Use the offset to add or subtract days
    adjust_given_short_date - Modifies Given InDate to come up with OutDate by adding or subtracting days specified in the Offset. The InDate must be in the format mm/dd/yy If the date given is greater than or equal 2000, the last parameter must be True
    get_long_date - Retrieves the current date in the format mm/dd/yyyy
    adjust_long_date - Retrieves the current date, plus or minus days specified in the format mm/dd/yyyy. Use the offset to add or subtract days
    diff_date - Returns the difference in two dates in the format(mm/dd/yy) Dates beyond the year 2000 will not work.
    CSOLIB2 get_date_long - get the system date in mm/dd/yyyy format.
    get_dow - returns the day of the week for a given date The date must be in mm/dd/yyyy format
    GmtToLocalTime - converts a GMT time value to local time format HH:MM:SS.
    set_sys_date - sets the system date. i.e set_sys_date(4,15,2000); sets the date to April 15, 2000
    set_locale_longdate_format - sets the long date format for the current user locale. This setting can be found in the control panel \\ Regional settings \\ date tab.
    set_locale_shortdate_format - sets the short date format for the current user locale. This setting can be found in the control panel \\ Regional settings \\ date tab.
    get_local_time - assigns a string containing the time hh:mm:ss:ms to the arguement and returns the time in hhmm format on a 24 hour clock
    set_sys_time - sets the system time. Use a 24 hour time format. ***NOTE: The clock in the system tray may not reflect the change. This is just a refresh problem, but the system time is set
    set_sys_time_date
    CSOLIB1 sleep - Waits the specified number of milliseconds
    CSOLIB2 start_timer
    end_timer
    sync_timer
    CSOLIB1 get_registry_value - Retrieves the data value from a key in the registry.
    CSOLIB2 create_reg_key - creates a registry key.
    del_reg_key - deletes a registry key.
    CSOLIB1 message_box - Brings up a modeless dialog box that messages can be sent to while WinRunner is executing.
    SendDlgItemMessageA - Sends text to the WinRunner Message dialog box. The Handle is required from the dialog box.
    GetDlgItemTextA - Gets the text from the WinRunner Message dialog box and returns the value to the buffer. The Handle is required from the dialog window
    CSOLIBX SMTP_email_x - e-mail message
    SMTP_email_file_x - e-mail message
    CSOLIB1 send_mail - Sends a mail message using the mail api.
    CSOLIB1 get_clipboard_text - Returns the text from the clipboard.
    get_pixel_color - Get the color of a pixel from a Window/Object.
    CSOLIB2 set_clipbrd_text - puts the specified string on the system clipboard.
    get_clipbrd_text - gets the current text from the system clipboard.
    CSOLIB2 check_pic - grabs a bitmap when run in Update mode and compare the actual bitmap to the one captured when run in Verify mode. If they match returns 0, otherwise it returns the number of mismatched pixels
    check_pic_area - grabs a bitmap when run in Update mode and compare the actual bitmap to the one captured when run in Verify mode. If they match returns 0, otherwise it returns the number of mismatched pixels
    print_scrn - captures the selected screen to the clipboard. Select Full to to capture the entire screen, or Active to capture only the active window.
    CaptureAreaToFile - captures the bitmap of a specified rectangle. The coordinates should be relative to the desktop.
    CaptureBmpToFile - captures the selected screen to the specified file. Select Full to to capture the entire desktop, or Active to capture only the active window.
    CSOLIB2 shut_down - shuts down an application as long as no dialogs come up on shutdown


Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page File Functions

    Category Function Notes Source
    CSOLIB1 get_free_disk_space - Returns the free disk space on the Drive Specified.
    CSOLIB2 get_drives - assigns a comma delimited string of available drive letters to the result
    CSOLIB1 get_directory_listing - Writes the contents of a directory to an output file
    delete_directory - Delete the directory specified All files and subdirectories will be deleted
    delete_empty_directory - Delete the empty directory specified
    create_directory - Creates the directory specified
    CSOLIB2 get_win_dir - returns the Windows directory path
    findfile - returns the path to a specified file, starting its search from the specified root. It will search all subfolders of the specified root. Wildcards are not supported.
    get_file_size - returns the size of a file in bytes. It will return a -1 if it fails.
    get_file_creation_date - returns the creation date of a file in mm/dd/yyyy format
    get_file_creation_time - returns the creation time of a file in hh:mm:ss format
    del_multiple_files - deletes multiple files. This funciton supports wildcards * and ?. Multiple file paths can be specified as in the example del_multiple_files(\"c:\\\\dir\\\\*.*,c:\\\\dir2\\\\*.txt\");
    CSOLIB1 get_83filename - fills the Out Name arguement with a filename for a given file in dos 8.3 format. For example, if longfilename.txt is passed in, longfi~1.txt would be returned.
    file_exists - Verifies that the file or directory exists and there is read access.
    CSOLIB1 delete_file - Delete the file specified
    delete_multiple_files - Delete the file(s) specified, wildcards are allowed.
    copy_file - Copies a file from one location to another
    rename_file - Renames or moves a file from one location to another location


Go to Top of this page.
Previous topic this page
Next topic this page

Set screen Microsoft COM Functions

    Category Function Notes Source
    load_com - loads a com server object
    unload_com - unloads a loaded or attached com server object
    com_activate_method - Activate a method of a com object
    com_set_property - sets the value of an ActiveX control property
    com_get_property - retrieves the value of an ActiveX control property
    com_set_prop,
    com_set_prop_type,
    com_get_prop_type,
    com_activate,
    attach_com - attaches to an already opened com server object
    ActiveX add-in ActiveX_get_info [used in WRSAFS DDGUIUtilities]
    web_obj_get_info [used in WRSAFS DDGUIUtilities]


Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page Window Functions

    win_check_bitmap, etc.

    Function prefix_check info_check ._get . (select & deselect)mouse. other
    win_

    (window)

    property value _bitmap,
    _gui,
    _info
    _desc,
    _text
    _highlight,
    _activate,
    _click_help,
    _click_on_text,
    _open,
    _close
    _drag,
    _drop,
    _mouse_click,
    _mouse_dbl_click,
    _mouse drag,
    _mouse_move
    _exists,
    _find text,
    _min,
    _max,
    _move,
    _move_locator_text,
    _resize,
    _restore,
    _type,
    _wait_bitmap

    Category Function Notes Source
    CSOLIB1 is_maximized - Checks to see if a window is maximized.
    minimize_window - Minimize the window
    maximize_window - Maximize the window
    CSOLIB2 get_win_text - retrieves the text from window or a control. It is the same as the Win API GetWindowText
    set_win_title - sets the title of a window
    CSOLIB2 web_frame_wait_for_text
    CSOLIB3
    web_frame_get_text_ex - fixes the backwards compatibility problem from WR 5.01 to WR 6.0
    web_frame_text_exists_ex - extends the limit of web_frame_text_exists to 256 characters.


Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page Text Data

    Function prefix_check info_check ._get . (select & deselect)mouse. other
    status_bar     _text      
    static_
    (text label)
    rc = E_OK if property is found in object _text
    rc = E_OK if text is found in object
    _text      
    edit_
    (text)
    property value _text
    rc = E_OK if text is found in object
    _selection
    _text,
    _block,
    _row_length,
    _rows count,
    _get selection string,
    _get selection pos
        _delete columns,
    _insert blank,
    _replace,
    _replace block,
    _set,
    _set selection,
    _type
    list property value _item location for content,  _selected _checked items,
    _column_header,
    _item_outValue,
    _item info,
    _item num,
    _selected,
    _subitem
    _select item,
    _select multi items,

    _select range,
    _deselect item,
    _deselect range
    _drag item,
    _drop item
    _extend item,
    _extend multi items,
    _extend range,
    _rename item,
    _set item state

    Category Function Notes Source
    CSOLIB1 get_tree_count - Get the number of items in a tree view
    get_edit_max_length - Returns the current text limit for an edit control.
    get_section_names - Write the names of the sections of an initialization file to an output file specified. arg1 is the output file to write to. arg2 is the initialization file to read the section names from.
    is_read_only - Checks to see if an edit control is read only.
    CSOLIB2 get_button_focus - returns a 1 if the button is in focus otherwise it returns a 0
    VirtObjWndPos - returns the center x and y coordinates relative to the top left corner of the window, rather that to the client area of the window as in the GUI map, for a virtual object
    force_edit_type - will type a string into an edit box even if it is a read only edit box.
    virt_tbl_get_cell_data - will grab the text from a cell of a virtual table. This requires that text recognition is working. Ex. text=virt_tbl_get_cell_data(\"virtual_table\
    virt_obj_get_text - will grab the text from a virtual object. This requires that text recognition is working. Ex. text=virt_obj_get_text(\"virtual_object\
    virt_list_get_item - will grab an item from a virtual list. This requires that text recognition is working. Ex. virt_list_get_item(\"virtual_list\
    get_menu_item_name - will return the string of the menu item. Menu items preceeded by an icon in the menu may record as Item_0 etc.
    win_from_point - returns the handle to the window or object at a specified point on the screen
    collapse_branch - collapses the selected branch and all of its child branches in a SysTreeView32 object
    sel_tab - will select the tab indicated by the 0 based index number
    get_sel_tab - will return the selected tab in a tab control. Returns -1 if error
    web_cursor_to_obj_ex - will move the cursor to the specified x,y coordinates on the object. It is similar to web_cursor_to_obj, but works on both Netscape and IE. Web add-in must be loaded
    obj_get_tooltip_text
    web_obj_get_tooltip_text
    obj_has_scroll - will tell if a window or object has scroll bars. It will return 0 if no scroll bars, 1 if it has a horizontal scroll, 2 if it has a vertical scroll, 3 if it has both
    pb_tree_rclick_item - will select the specified item in a PBTreeView32 object and right click it. Item is the complete path to the item. Index is the number of the item in the tree.
    web_edit_replace_section - will replace a section of text in a web multiline edit box with the given string


Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page Graphic Controls

    Function prefix_check info_check ._get . (select & deselect)mouse. other
    button_
    (check, push, radio)
    rc = E_OK if property value is found in object _state for ON or DIMMED or OFF _state ON or DIMMED or OFF _press   _set
    menu_
    (menu item)
        _desc, _item, _item num _item    
    scroll_ property value _pos _max, _min, _pos, _selected   _drag,
    _drag from min
     
    tab_   _item _get selected, _get selected item    
    toolbar_     _button, _button info, _button num, _buttons count _select item   _button press

Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page Special Controls

    Function prefix_check info_check ._get . (select & deselect)mouse. other
    spin_     _pos, _range     _down, _max, _min, _next, _prev, _set, _up
    calendar_            
    ActiveBar_       _combo select item, _select menu, _select tool   _dump filename
    datawindow            
    TreeView_       _list expand item, _list collapse item    
    (analog)     get_text click on text    
    obj_
    (custom object)
    property value _bitmap,
    _gui
    _desc,
    _text
    _click on text,
    _mouse_click,
    _mouse dbl click,
    _mouse drag,
    _mouse move
    _drag,
    _drop
    _exists,
    _find text,
    _highlight,
    _set_info,
    _type,
    _move locator track,
    _wait_bitmap

    Note: all standard classes except toolbar have a _wait_info and _get_info function.

    Category Function Notes Source
    CSOLIB3 sh_tbl_get_cell_data - retrieves the data inside a Sheridan Data Grid cell


Go to Top of this page.
Previous topic this page
Next topic this page

Set this at top of window. Number & String Functions

    Category Function Notes Source
    CSOLIB1 string_to_long - Returns the converted string as a long value.
    string_to_double - Returns the converted string as a double value.
    get_random_number - Return an integer between the two specified values
    real_to_long - Converts the real number and returns an integer number
    CSOLIB1 parse_string - Replace delimiters in the input string with the replacement character to create the output string
    modify_string - Add a '\\' character in front of a '<' and '-' and '+' characters in string 1 to make string 2
    CSOLIB3 abs_val - gives the absolute value of a number
    CSOLIBX atoi_x - converts a string to an integer if possible
    itoa_x - converts an integer to a string
    CSOLIB3 switch_neg - switches the negative sign from the right of the number to the left of the number
    Ferry str_get_regexp - Returns the string subset that matches the specified regular expression.
    str_replace - Replace each occurences of any character with another string.
    str_replace_regexp - Replace each occurences of a string or regular expression with another string.
    get_token - Returns a token or a range of tokens from a separator delimited string. Can specify the "last" item as a location (very useful at times :-) ).


Go to Top of this page.
Previous topic this page
Next topic this page

Set this at top of window. Array Functions

    Category Function Notes Source
    CSOLIB3 GetArraySize - returns the number of elements in the array
    DeleteArray - deletes an array from memory
    CSOLIB3 BuildStringFromArray - takes an array and creates a string with the elements of the array
    Ferry array_add - Add an item at the end of a sequential array (so you don't have to worry about keeping track of the array size).
    array_append - Appends the elements of one array to the end of another array. ** Updated to work with empty array **
    array_assign Fills in the target array with the values of the source array.
    array_clear - Clears out the content of the array. ** Updated to use "out" as parameter type **
    array_compare Compare 2 arrays, both on the key and element values.
    array_copy - Makes a copy of an array (same length, key, value).
    array_get_first_index - Returns the first index in an array. Only works for a sequential array. This function has been updated to run faster than before (up to 90 times faster) -- but no longer supports associative array. If anyone still needs support for associative array, let me know and I'll try to support it. ** Updated on May 10, 2002 to work correctly with very small arrays (e.g. 2 elements) ** ** Updated on September 8, 2002 to fix bug that causes the function to go into an infinite loop when using a certain sized array **
    array_get_last_index - Returns the last index in the array. Only works for a sequential array. This function has been updated to run faster than before (up to 90 times faster) -- as with the array_get_first_index function, this function no longer support associative arrays. Let me know if anyone would still be interested in that support. ** Updated on Oct 11, 2001. I was informed that this function was written as array_get_last_index2, which breaks some other functions that uses this function. This has been corrected. ** ** Update on February 13, 2002. I was informed by Dianne Davis (formerly with XO Communications) that this function didn't work as expected, and after some investigation, I found the error. It has since been fixed. ** ** Updated on September 9, 2002 to fix bug that causes the function to go into an infinite loop when using a certain sized array (see array_get_first_index) **
    array_get_first_last_index - Returns both the first and last index in an array. Uses array_get_first_index and array_get_last_index, so it currently only supports sequential array.
    array_insert - Inserts an element to a specified position of a sequential array.
    array_inverse - Inverses the order of a sequential array.
    array_isempty - Determines whether an array is empty. ** Updated on Mar 15, 2004. Thanks to Andrew Bleach for reporting that this function was returning inverse return value. This has been corrected. **
    array_length - Returns the length of the array. More useful if the array is sequentially indexed, of course.
    array_pick - Randomly pick an array element. Does not modify the array's elements at all.
    array_pick_remove - Returns a randomly picked array item, and remove the element from the array. This is basically an array_pick and array_remove together.
    array_remove - Remove an element from the array, and move the remaining elements down so that the array is still sequential. This allows you to remove an element from the middle of an array.
    array_shuffle - Shuffles the content of an array. May not be that useful to most people, but can be useful to some people. (Corrected bug that causes it to complain about invalid number of parameters).
    array_subset - Copy a subset of an array to another array. Also allows the user to specify the starting index in the target array.
    array_swap - Swaps the element contents of the specified array index locations. E.g. to swap the element contents of the first and last element (hmm, maybe for sorting?).
    join - Join the elements in an array into a string. Basically the reverse of the split command. You can specify any string as the concatenator string.
    match_array_to_array - Compares the contents of 2 arrays, and populates 3 result arrays: matching elements, unmatched elements from the first array, and unmatched elements in the second array.
    split2 - Works like the regular split, except this one accepts string as a delimiter.
    split2_append - An extension of split2 that appends to an array as opposed to replacing it. Very useful at times.
    Ferry array_bubblesort - Sort an array using bubblesort -- very simple (array must start at index 0). This sorting method is very inefficient for large arrays. Seriously consider using array_mergesort() or array_quicksort() instead.
    array_bubblesort2 - Another implementation of array_bubblesort that allows for sorting only on a subset of an array.
    array_mergesort - Sort a sequentially ordered array using mergesort algorithm (array must start at index 0).
    array_mergesort2 - Sort a subset of a sequentially ordered array using mergesort algorithm.
    array_quicksort - Sort a sequentially ordered array using quicksort algorithm.
    array_quicksort2 - Sort a subset or a sequentially ordered array using quicksort algorithm.


Go to Top of this page.
Previous topic this page
Next topic this page

Set this at top of window. FIFO Queues and LIFO Stacks

    Category Function Notes Source
    Ferry queue_init - Initializes a queue. The queue will be cleared of all its existing entries.
    queue_length - Returns the length of the queue.
    enqueue or queue_push - Adds an entry to the end of the queue.
    queue_unpop - Adds an entry to the beginning of the queue. (New in 2.1)
    dequeue or queue_pop - Remove an entry from the beginning of the queue.
    queue_isempty - Whether the queue is empty.

    stack_init - Initializes a stack. The stack will be cleared of all its existing entries.
    stack_length - Returns the length of the stack.
    stack_push - Adds an entry to the end of the stack.
    stack_pop - Remove an entry from the end of the stack.
    stack_isempty - Whether the stack is empty.


Go to Top of this page.
Previous topic this page
Next topic this page

Set this at top of window. CSOLIBS

    Here is a cross-reference list of functions from each of the libraries.

    CSOLIB1
    get_computer_name - Returns the name of the computer which is logged on to the computer system
    get_user_name - Returns the name of the user as specified in the network settings of the computer"
    sleep - Waits the specified number of milliseconds
    beep - Makes a beep sound through the internal speaker
    delete_file - Delete the file specified
    delete_multiple_files - Delete the file(s) specified, wildcards are allowed.
    delete_directory - Delete the directory specified All files and subdirectories will be deleted
    delete_empty_directory - Delete the empty directory specified
    create_directory - Creates the directory specified
    copy_file - Copies a file from one location to another
    rename_file - Renames or moves a file from one location to another location
    get_short_date - Retrieves the current date in the format mm/dd/yy
    adjust_short_date - Retrieves the current date, plus or minus days specified in the format mm/dd/yy. Use the offset to add or subtract days
    adjust_given_short_date - Modifies Given InDate to come up with OutDate by adding or subtracting days specified in the Offset. The InDate must be in the format mm/dd/yy If the date given is greater than or equal 2000, the last parameter must be True
    minimize_window - Minimize the window
    maximize_window - Maximize the window
    get_tree_count - Get the number of items in a tree view
    get_long_date - Retrieves the current date in the format mm/dd/yyyy
    adjust_long_date - Retrieves the current date, plus or minus days specified in the format mm/dd/yyyy. Use the offset to add or subtract days
    get_random_number - Return an integer between the two specified values
    message_beep - Makes a beep sound through the default sound system
    parse_string - Replace delimiters in the input string with the replacement character to create the output string
    modify_string - Add a '\\' character in front of a '<' and '-' and '+' characters in string 1 to make string 2
    get_directory_listing - Writes the contents of a directory to an output file
    real_to_long - Converts the real number and returns an integer number
    GetDlgItemTextA - Gets the text from the WinRunner Message dialog box and returns the value to the buffer. The Handle is required from the dialog window
    SendDlgItemMessageA - Sends text to the WinRunner Message dialog box. The Handle is required from the dialog box.
    message_box - Brings up a modeless dialog box that messages can be sent to while WinRunner is executing.
    file_exists - Verifies that the file or directory exists and there is read access.
    get_free_disk_space - Returns the free disk space on the Drive Specified.
    get_edit_max_length - Returns the current text limit for an edit control.
    get_section_names - Write the names of the sections of an initialization file to an output file specified. arg1 is the output file to write to. arg2 is the initialization file to read the section names from.
    send_mail - Sends a mail message using the mail api.
    get_clipboard_text - Returns the text from the clipboard.
    get_pixel_color - Get the color of a pixel from a Window/Object.
    get_registry_value - Retrieves the data value from a key in the registry.
    string_to_long - Returns the converted string as a long value.
    string_to_double - Returns the converted string as a double value.
    is_maximized - Checks to see if a window is maximized.
    diff_date - Returns the difference in two dates in the format(mm/dd/yy) Dates beyond the year 2000 will not work.
    is_read_only - Checks to see if an edit control is read only. CSOLIB2
    get_date_long - get the system date in mm/dd/yyyy format.
    del_reg_key - deletes a registry key.
    get_drives - assigns a comma delimited string of available drive letters to the result
    get_local_time - assigns a string containing the time hh:mm:ss:ms to the arguement and returns the time in hhmm format on a 24 hour clock
    get_free_mem - returns the percentage of memory in use and assigns args free memory of various types in bytes
    shut_down - shuts down an application as long as no dialogs come up on shutdown
    get_comp_name - gets the name of the computer
    get_button_focus - returns a 1 if the button is in focus otherwise it returns a 0
    set_win_title - sets the title of a window
    del_multiple_files - deletes multiple files. This funciton supports wildcards * and ?. Multiple file paths can be specified as in the example del_multiple_files(\"c:\\\\dir\\\\*.*,c:\\\\dir2\\\\*.txt\");
    get_file_creation_date - returns the creation date of a file in mm/dd/yyyy format
    get_file_creation_time - returns the creation time of a file in hh:mm:ss format
    check_pic - grabs a bitmap when run in Update mode and compare the actual bitmap to the one captured when run in Verify mode. If they match returns 0, otherwise it returns the number of mismatched pixels
    check_pic_area - grabs a bitmap when run in Update mode and compare the actual bitmap to the one captured when run in Verify mode. If they match returns 0, otherwise it returns the number of mismatched pixels
    get_83filename - fills the Out Name arguement with a filename for a given file in dos 8.3 format. For example, if longfilename.txt is passed in, longfi~1.txt would be returned.
    VirtObjWndPos - returns the center x and y coordinates relative to the top left corner of the window, rather that to the client area of the window as in the GUI map, for a virtual object
    force_edit_type - types a string into an edit box even if it is a read only edit box.
    get_screen_res - returns the current x and y resolution of the screen
    set_sys_date - sets the system date. i.e set_sys_date(4,15,2000); will set the date to April 15, 2000
    print_scrn - captures the selected screen to the clipboard. Select Full to to capture the entire screen, or Active to capture only the active window.
    set_locale_longdate_format - sets the long date format for the current user locale. This setting can be found in the control panel \\ Regional settings \\ date tab.
    set_locale_shortdate_format - sets the short date format for the current user locale. This setting can be found in the control panel \\ Regional settings \\ date tab.
    virt_tbl_get_cell_data - grabs the text from a cell of a virtual table. This requires that text recognition is working. Ex. text=virt_tbl_get_cell_data(\"virtual_table\
    virt_obj_get_text - grabs the text from a virtual object. This requires that text recognition is working. Ex. text=virt_obj_get_text(\"virtual_object\
    virt_list_get_item - grabs an item from a virtual list. This requires that text recognition is working. Ex. virt_list_get_item(\"virtual_list\
    get_file_size - returns the size of a file in bytes. It will return a -1 if it fails.
    get_menu_item_name - returns the string of the menu item. Menu items preceeded by an icon in the menu may record as Item_0 etc.
    create_reg_key - creates a registry key.
    CaptureBmpToFile - captures the selected screen to the specified file. Select Full to to capture the entire desktop, or Active to capture only the active window.
    GmtToLocalTime - converts a GMT time value to local time format HH:MM:SS.
    keybd_type - types a string using the keybd_event API function. It works similar to the type command
    get_win_dir - returns the Windows directory path
    win_from_point - returns the handle to the window or object at a specified point on the screen
    collapse_branch - collapses the selected branch and all of its child branches in a SysTreeView32 object
    get_dow - returns the day of the week for a given date The date must be in mm/dd/yyyy format
    sel_tab - selects the tab indicated by the 0 based index number
    get_sel_tab - returns the selected tab in a tab control. Returns -1 if error
    web_cursor_to_obj_ex - moves the cursor to the specified x,y coordinates on the object. It is similar to web_cursor_to_obj, but works on both Netscape and IE. Web add-in must be loaded
    obj_get_tooltip_text
    web_obj_get_tooltip_text
    get_win_text - retrieves the text from window or a control. It is the same as the Win API GetWindowText
    get_win_ver - retrieves the Windows OS version including build number and service pack
    CaptureAreaToFile - captures the bitmap of a specified rectangle. The coordinates should be relative to the desktop.
    obj_has_scroll - tells if a window or object has scroll bars. It will return 0 if no scroll bars, 1 if it has a horizontal scroll, 2 if it has a vertical scroll, 3 if it has both
    findfile - returns the path to a specified file, starting its search from the specified root. It will search all subfolders of the specified root. Wildcards are not supported.
    pb_tree_rclick_item - selects the specified item in a PBTreeView32 object and right click it. Item is the complete path to the item. Index is the number of the item in the tree.
    web_edit_replace_section - replaces a section of text in a web multiline edit box with the given string
    set_clipbrd_text - puts the specified string on the system clipboard.
    get_clipbrd_text - gets the current text from the system clipboard.
    start_timer
    end_timer
    sync_timer
    web_frame_wait_for_text
    set_sys_time - sets the system time. Use a 24 hour time format. ***NOTE: The clock in the system tray may not reflect the change. This is just a refresh problem, but the system time is set
    set_sys_time_date Functions from CSOLIB3
    sh_tbl_get_cell_data - retrieves the data inside a Sheridan Data Grid cell
    web_frame_get_text_ex - fixes the backwards compatibility problem from WR 5.01 to WR 6.0
    GetArraySize - returns the number of elements in the array
    DeleteArray - deletes an array from memory
    BuildStringFromArray - takes an array and creates a string with the elements of the array
    move_to_object - scrolls the window to find the desired object
    switch_neg - switches the negative sign from the right of the number to the left of the number
    abs_val - gives the absolute value of a number
    web_frame_text_exists_ex - extends the limit of web_frame_text_exists to 256 characters. "CSO Lib X" functions from CSOLIBX
    SMTP_email_x - e-mail message
    SMTP_email_file_x - e-mail message
    get_last_error - gets last error from csolibX (for QuickTest)
    dos_system_x - fixes the return value in dos_system (has only been tested on NT)
    atoi_x - converts a string to an integer if possible
    itoa_x - converts an integer to a string

 

    Several useful functions were developed by individuals in the Mercury Customer Support Organization. They are not guaranteed to work, and are not supported by Mercury Intractive Technical Support.

    Idea Avoid the hassle of integrating Mercury's CSO libraries. Use the WRSAFS framework

    First log onto Mercury's FTP site ftp.merc-int.com.

    The username and password that used to display here were removed to avoid more pain dealing with threats from Mercury Interactive lawyers.

    Drill down to folders /data/ ftp/ pub/ Winrunner/ cso/

    download CSOLIB (1) 123,606 bytes 4/7/2000

    The first CSOLIB provides several executable files (cso16lib.dll, cso32lib.dll, del_dir.exe, list_dir.exe, lv_fin.dll, message.exe, messag1.exe, msg.exe, msg1.exe) which should be copied into the /arch folder under c:\Program Files\Mercury Interactive\WinRunner. That's where WinRunner stores other executable files.

    The heart of CSOLIB.zip is the script which defines the new functions listed on on the right. This script adds items in the Function Generator under category “cso functions”. Press F7 or go to Create > Insert Function > From Function Generator...

    There are two versions of this script (compiled modules): cso16lib on 16-bit original “Windows” machines, and cso32lib on 32-bit “Windows NT” or other systems. You are instructed by the install.txt file to copy them both into the WinRunner lib folder, where other TSL scripts from WinRunner reside.

    The cso_init initialization script detects the OS being used and loads the compiled module. You are asked to call cso_init by adding a line to the tslinit script within the WinRunner dat folder. However, I think it's better to put it in your own initialization script.

    download CSOLIB2 121,272 bytes 6/6/2000 (NOT 120,873 bytes May 22, 2000)

    Executable files csolib2.dll and clipboard.dll (which should be copied to WinRunner's /arch folder) are referenced by scripts cso2_init and cso2load (which should be put in WinRunner's /lib folder).

    cso2_init initiates function initcso2() from compiled module cso2load. This adds into the function generator category “cso functions 2” functions.

    download CSOLIB3 7,856 bytes

    There are no executable files in this library.

    cso3_init initiates function initcso3() from compiled module cso3load. This adds into the function generator category “cso functions 3” functions.

    download CSOLIBx 79,829 bytes Jun 23, 2000

    Files mfcarp.dll and csolibx.dll (which should be copied to WinRunner's /arch folder) are referenced by scripts csox_init and csoxload (which should be put in WinRunner's /lib folder).

    csox_init initiates function csox_load() from compiled module csoxload. This adds into the function generator category “CSO Lib X” functions.

 
Go to Top of this page.
Previous topic this page
Next topic this page

Set screen Custom Capture and Comparison Functions

    WinRunner maintains an internal table that associates property functions with function names.

    The linkage between the query and the custom DLL file is registered using WinRunner's add_record_attr function. One of the parameters to is the name of the WinRunner standard property verification function which assesses whether the custom property being defined is really a valid string, number, or boolean expression (string_verify, num_verify, bool_verify).

    WinRunner's delete_record_attr function removes the property.

    WinRunner's add_cust_record_class function associates a custom record function that enables WinRunner to record descriptive statements into your test script, with a custom GUI object class a logical name function, that enables WinRunner to assign descriptive logical names , with a custom GUI object class

    Custom checks must be registered with the Windows operating system using a statement such as the following:

    gui_ver_add_check ( property check name, capture function, comparison function, [optional display function] )

    To make a custom check appear in the GUI Checkpoint dialog box:

    gui_ver_add_check_to_class ( class, property check name, )



I last picked up the WinRunner Customization Guide from an download FTP of 1.3MB 132 page wrun_cus.pdf file dated 12/4/98.

This describes how to create a custom function generator.


Go to Top of this page.
Previous topic this page
Next topic this page

Set screen Custom Function Libraries

    Function libraries useful only to a specific application should be called from the application's initialization script. Examples of such scripts include these modules which are not applicable to


      open_flight
      open_order

    Generic custom functions, such as date, string, and array manipulation functions, can be used by all applications, so they should be called from the WinRunner folder under Program Files.

.
Go to Top of this page.
Previous topic this page
Next topic this page

Set screen Generic Custom Function Libraries



tool As part of WinRunner installation, Mercury provides a WDiff v1.49 utility that displays differences between text files in directories (folders) or zip archives.

webpage article AdventNet's built-in functions

Go to Top of this page.
Previous topic this page
Next topic this page

Go to top of page Function Naming Conventions

    Standard functions are those defined by Mercury. Mercury begins some standard WinRunner function names with an action (check, get, etc.) and some with an object name (win for window, list, push button, etc.) This makes TSL function names more difficult to remember.

    Custom functions are defined by users of WinRunner. An organization may choose to segregate the functions they create into application-specific functions which pertain only to certain uses, and generic functions common to all applications.

    Name functions with their ownership, object, and action To make functions easier to remember, begin names with ownership information,

    function ownership data action Note
    _aqueue_link _ aqueue link Applications programmers should not use an underline to begin function names because this is the industry convention for system internals control functions.
    my_app_login my_ app_ _login "my_" should only be used for code for the personal use of a programmer.
    flt_order_edit flt
    application
    order_ _edit
    flt_sum_rpt_report summary report _print
    flt_dtl_rpt_todisk detail report _todisk
    gen_email_send generic email_ _send This would be in a generic function library available to all applications within an organization.
    gen_fax_receive fax_ receive


Go to Top of this page.
Previous topic this page
Next topic this page

Portions ©Copyright 1996-2010 Wilson Mar. All rights reserved. | Privacy Policy |


How I may help

Send a message with your email client program


Your rating of this page:
Low High




Your first name:

Your family name:

Your location (city, country):

Your Email address: 



  Top of Page Go to top of page

Thank you!