User misha ( posted:

RE: Can U please help : ******
Good advice there Garry.

Pradeep, what is happening here is that WR does not recognise the
"html_file" type of input box, and so does not record the control into the
GUI map nor any of the keystrokes/mouseclicks on it (while in Context
Sensitive recording).

One workaround is to use the GUI map editor, press the "Learn" button to get
the object into the GUI map. Both edit box and button are lumped together
in one object. Then use code like the following:

# object is "edit" in gui map

# to type text into edit box
obj_type("edit","typed in text");

# to press the button, tab to it and press space

Note that WinRunner still will not record properly on the object.

If you use a lot of these type of objects in your AUT, I would advise you to
ask Mercury to add support for html_file objects in the webtest add-in.


----- Original Message -----
From: Shum, Garry
To: 'aniruddh_2k' ; ''
Sent: Thursday, February 21, 2002 5:21 AM
Subject: [winrunner] RE: Can U please help : ******

Fyi, I have never automated any web applications but there are a few things
you can check. First, make sure your WinRunner installation has the proper
patches installed if you are by any chance using IE6+. I don't think
Netscape is supported.
In your situation, I would first make sure the target object is
recognized by the script rather than GUISPY. Use....
obj_highlight("{class: object,MSW_class: html_file,html_name: edit}",8); make sure the object is even recognized from a script. From the
sounds of it, this object does not exist until you first activate it via
some sort of click or dropdown box, but we don't know because you weren't
detailed enough in your message. You mentioned that there are 2 edit
objects. If so, then you should use...
obj_highlight("{class: object,MSW_class: html_file,html_name: edit,
location: 0}",8);
obj_highlight("{class: object,MSW_class: html_file,html_name: edit,
location: 1}",8); make sure both edit objects are recognized from a script. Once you
are positive the objects are recognized from a script, NOT GUISPY, use the
physical description you used to recognize each respective edit object.
Keep in mind that if you use the "index" object property rather than the
"location" object property, then the index property will always be 0 for the
currently active object. If these edit objects do not always exist unless
you first activate them via a mouse click or something, like I believe, then
you have to keep in mind that these sorts of objects sometimes disappear
before you have time to work with them. In the case of drop-down edit
objects, you can do funny stuff like...

win_wait_info("{class: object,MSW_class: html_file,html_name: edit,
location: 0}","enabled",1,20);
...which might prevent the object from disappearing before you can work with
it. Anyways, this is all hypothetical since I haven't worked with any web
applications yet. My advice is, be more detailed with your questions, and
don't end your message with "very ******" or any other such quotation
because some people will take it as a demand rather than a plead.