I'm a SilkTest programmer, and did this in SilkTest, but don't know how to do it in WinRunner. I'm assisting a coworker.
Here's the problem.
Our product has a custom text field for dates, and things like edit_set can't be used (and in SilkTest, SetText can't be used).
The trick I used was to remove slashes, click in the field, use the HOME key, then type the date.
For example: 01/01/2001 --> <Home>01012001<Enter>.
How do I do this in WinRunner?
Manager - Performance Engineering
tel: +1 978 947 4219
Take a look at 'obj_type' which may work if an 'edit_set' does not execute correctly on this control - this is basically just moving up the class tree to a more generic object as you would in Silk.
If there is no-go with this, you could do an analogue record (press the record button twice) of the raw keystrokes at the point of entering the date.
Not very elegant, but at least it would only be one line of analogue code, while the rest of the script remains context sensitive (i.e. proper OO approach).
Hope this helps,
I'm not exactly sure but this might help.
Check under the "calendar" functions.
Check Arguments – Date Format
This dialog box enables you to check that the contents of the object are in the specified date format.
Select a date format to specify as arguments. The following date formats are available:
Day, Month dd, yyyy Friday (or Fri), September (or Sept) 23, 1999
dd Month yyyy 24 March 1999
Day dd Month yyyy Friday (or Fri) 24 September (or Sept) 1999
When the day or month begins with a zero (such as 03 for March), the 0 is not required for a successful format check.
OK: Saves the specified date format and closes the dialog box.
Cancel: Closes the dialog box without saving the specified date format.
[This message has been edited by mracicot (edited 01-30-2001).]
-- Mike --
Another method - assuming a relatively static tab order: Tab to the field immediately after the page is loaded, then type the date. Just a guess: you will record an 'obj_type("","");' statement.
Let us all know what worked for you.