![]() ![]() ![]() ![]() | ![]() ![]() ![]()
| Topics this page:
|
Related Topics: |
|
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 |
|
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] |
|
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. |
|
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 |
|
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 |
|
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 |
|
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 :-) ). |
|
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. |
|
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.
|
|
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/
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.
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.
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.
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.
| ![]() ![]() ![]() |
| I last picked up the WinRunner Customization Guide from an | ![]() ![]() ![]() |
| . |
|
|
![]() ![]() ![]() |
|
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 |
![]()
| Your first name: Your family name: Your location (city, country): Your Email address: |
Top of Page ![]() Thank you! |