WebRecorder does not record text entered in form fields.

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jrlgb
Newbie
Posts: 2
Joined: Tue Mar 27, 2007 8:59 pm

WebRecorder does not record text entered in form fields.

Post by jrlgb » Tue Mar 27, 2007 9:54 pm

I am evaluating WebRecorder - I wish to automate various operations involving access to secure web sites. From the description I expected that WebRecorder would create a script that included the text entered in form fields. But this does not seem to appear. So what have I misunderstood?

OS is Windows XP Media Center Edition. Webrecorder and MacroScheduler Evaluation versions downloaded 24/03/2007.

For example, I recorded the login to https://spares.fujitsu-siemens.com. I clicked in the User-Id box, filled in a valid user name, clicked in the password box, entered a correct password, and clicked the Login button, and moved to the next page as expected. But the script (below) does not seem to include the text entered into the boxes. And if I run the script with MacroScheduler the login page is loaded, but nothing else happens.

// Generated by MacroScript WebRecorder 1.72
// Recorded on Tuesday, March 27, 2007, at 10:22 PM
LibLoad>IEAuto.dll,hIE
If>hIE=0
MessageModal>Could not load IEAuto.dll, make sure it is in the path or edit the LibLoad line.
Goto>end_script
EndIf

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1

LibFunc>hIE,CreateIE,IE[1],0

LibFunc>hIE,Navigate,r,%IE[1]%,https://spares.fujitsu-siemens.com/
LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>TagValue={"login"}
LibFunc>hIE,ClickTag,r,%IE[1]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

LibFree>hIE
Label>end_script

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 28, 2007 7:52 am

Hi,

I had a look at this site and I can see the problem is caused by the fact that the entire site is a single frame with no ID, or name. This is confusing WebRecorder and IEAuto.DLL:

Code: Select all

<HTML> 

<HEAD> 
</HEAD> 

<FRAMESET row> 
	<frame src="/miroebusiness/jsp/fsc/Welcome.jsp">
	</frame>
</FRAMESET> 

</HTML>
The simple solution is to navigate directly to the page of the frame. So just enter the following into WebRecorder:

https://spares.fujitsu-siemens.com/miro ... elcome.jsp

This then works fine and produces code like the below, which works ok:

Code: Select all

// Generated by MacroScript WebRecorder 1.72
// Recorded on  Wednesday, March 28, 2007, at 08:31 AM
LibLoad>IEAuto.dll,hIE
If>hIE=0
  MessageModal>Could not load IEAuto.dll, make sure it is in the path or edit the LibLoad line.
  Goto>end_script
EndIf

//Move the mouse cursor out of harm's way to avoid causing mouseover events to interrupt
MouseMove>0,0
Let>delay=1

LibFunc>hIE,CreateIE,IE[1],0

LibFunc>hIE,Navigate,r,%IE[1]%,https://spares.fujitsu-siemens.com/miroebusiness/jsp/fsc/Welcome.jsp
LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay

Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>FieldName={"txtID"}
Let>FieldValue={"Username"}
LibFunc>hIE,FormFill,r,%IE[1]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>FieldName={"txtPassword"}
Let>FieldValue={"Password"}
LibFunc>hIE,FormFill,r,%IE[1]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0

Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>TagValue={"login"}
LibFunc>hIE,ClickTag,r,%IE[1]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue

LibFunc>hIE,WaitIE,r,%IE[1]%
Wait>delay


LibFree>hIE
Label>end_script
We need to see if there is a way to cope with frames that have no identity. But the above works for this site.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

jrlgb
Newbie
Posts: 2
Joined: Tue Mar 27, 2007 8:59 pm

Post by jrlgb » Wed Mar 28, 2007 7:56 pm

Marcus,

Thanks for your reply. The cause of the trouble seems to be unnecessary complexity on the part of the site developers. I believe the site was developed using the IBM Websphere product, which might account for it.

I am interested to know (briefly) how you found the cause of the problem. If it had not been a secure site I would have run a LAN trace (Ethereal or Microsoft Netmon) and found the HTML from that. I still would not have understood the reason for the problem, but I might have got closer.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Mar 28, 2007 7:57 pm

I just hit View/Source.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts