IE_FormFill> and <select> tags

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
paulh
Newbie
Posts: 2
Joined: Thu Jun 04, 2009 1:19 am

IE_FormFill> and <select> tags

Post by paulh » Thu Jun 04, 2009 3:31 am

Hi All,

I'm new here.

We're currently evaluating the Macro Scheduler for automating logging in and processing a web based application. The main page contains (among other objects) four tags to allow the user to enter Start hour and minute and End hour and minute values.
The script correctly "clicks" on or enters text into all the other Checkbox, Radio buttons, Text boxes and the Submit button but behaves unexpectedly with the objects.

I've progressively removed all the other checkboxes etc from the .HTML to try to debug the issue.

The .HTML code is:-








00
01
02


00
15
30
45
59


00
01
02


00
15
30
45
59










The script is:-

// Generated by MacroScript WebRecorder 2.1
// Recorded on Thursday, June 4, 2009, at 09:02 AM

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

IE_Navigate>%IE[2]%,http://toecutter/TestMacro/mainscreen2.asp,r
IE_Wait>%IE[2]%,r
Wait>delay

Let>FrameName={""}
Let>FormName={"mform"}
Let>FieldName={"EH"}
Let>FieldValue={"02"}
IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"mform"}
Let>FieldName={"EM"}
Let>FieldValue={"15"}
IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r


Let>FrameName={""}
Let>FormName={"mform"}
Let>FieldName={"SH"}
Let>FieldValue={"01"}
IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

Let>FrameName={""}
Let>FormName={"mform"}
Let>FieldName={"SM"}
Let>FieldValue={"59"}
IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r


Let>FrameName={""}
Let>FormName={"mform"}
Let>TagValue={"B1"}
IE_ClickTag>%IE[2]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r

IE_Wait>%IE[2]%,r
Wait>delay

Label>end_script


I've tried renaming the tags a few different times and re-arranged the blocks on the page and tried re-ordering the IE_FormFill statements as well. The behaviour is consistently the same.

Whether I step through the script or run it, no matter how I re-arrange code or html, the IE_FormFill statements work correctly for the first two tags ("SH" and "SH" in the example) but the IE_FormFill for the third ("EH") updates the first and the the IE_FormFill for the fourth ("EM") updates the second .

Has anyone else experienced this?

Thanks,
Paul.

paulh
Newbie
Posts: 2
Joined: Thu Jun 04, 2009 1:19 am

Post by paulh » Thu Jun 04, 2009 11:38 pm

Interestingly, when I replaced

IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r

with

IE_FormFill>%IE[2]%,str:FrameName,str:FormName,str:FieldName,#INDEX#:%offset%,0,r

where %offset% is the calculated index of the OPTION required, it works correctly and updates the appropriate .

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