R. E. Cook
RunningShoes Library for WinRunner
Custom WinRunner Functions
and Utilities, to Your Specs
A Random Collection of WinRunner Solutions
Creating DLLs for WinRunner
(Mercury Interactive's Worldwide Users Conference 2000)
R. E. Cook
A Random Collection of TSL Solutions
This is just a small collection of functions and other suggestions. Most of
these originated as my replies to questions on other WinRunner discussion boards
or from the classes I teach.
The code for most examples is displayed as a small text file to avoid the format mangling that browsers tend
to do to normal pages (lines wrap, indents disappear, and the resulting code is
unreadable). You can copy and paste easily from these text files.
Array contains an element?
Determine whether an element is in an array. 7/6/2002
file to capture an executable's return value. TSL's invoke_application()
won't give it to you.
Conditionally calling an initialization
script A simple bit of code ensures that an init script will always be
called for a test script regardless of whether the test is called from a driver
Character from its ascii code
Generate a character if you know its ascii value. 2/9/00
table entries containing WinRunner constants How to use defined constant names (e.g., "TRUE") in the data
table and have WinRunner convert them to their defined values. 7/6/2002
table problem cell entries Cell entries that are changed by Excel or the
Data Table editor 7/13/02.
Extern (DLL) functions and
strings Strings passed into or out of extern functions are subject to
several undocumented constraints on their size. Violating those constraints
causes RPC errors. 12/27/02
Get text by sending a Windows
message. The process SOMETIMES works when obj_get_text() fails. Can be
effective with VC++ (Afx...) objects. 2/21/02
control on a SysListView32 list control. How to click the column headers to
sort the columns. The technique might be adaptable to a variety of other controls.
Index of a specified occurrence
of a character in
a string 6/17/01
Integer portion of any input
value Correct the error generated by TSL's int(-x). 2/21/00
infinitely for() vs. while()
Parallel tests on 2 PCs with a single test result Extend the "Synchronize tests on 2
PCs" process to include all of the results from both PCs in a single test
What they are and how to avoid
and (sometimes) recover from them. 12/27/02
keystrokes to the AUT 6/9/2000
test run from within a function Wish you could use texit in a function?
Here's how you can.
Synchronize tests on 2 PCs How to use the Windows API and an ini file to enable communication between the PCs.
WinRunner configuration values Reading from wrun.ini.
WinRunner version at runtime How
to determine the version of WinRunner from within a script.
Updated 25 October 2005