I've got a couple of issues with WebRecorder 2.0.
1.) When starting to record a script - entering a url as http://www.example.com - soon as I type the h in http, it starts flaking out on me and trying to autofill - can I stop the auto populat as I want to start it manually.
2.) In the following script (I've changed the names and passwords and web address to protect the innocent)., I cannot have the file auto download. It just pops up the internet security box below the address bar and I have to click on download file. When it didn't do that to me while recording the script. Strange....is there a permissions issue when Web Recorder is running the script?
// Generated by MacroScript WebRecorder 2.0
// Recorded on Monday, October 29, 2007, at 03:35 PM
//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[0]
IE_Navigate>%IE[0]%,http://www.testportal.com/,r
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={"Form1"}
Let>FieldName={"txtUserId"}
Let>FieldValue={"test"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Let>FrameName={""}
Let>FormName={"Form1"}
Let>FieldName={"txtPassword"}
Let>FieldValue={"test"}
IE_FormFill>%IE[0]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0,r
Let>FrameName={""}
Let>FormName={"Form1"}
Let>TagValue={"chkRememberID:on"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,CHECKBOX,str:TagValue,r
Let>FrameName={""}
Let>FormName={"Form1"}
Let>TagValue={"login"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={" Manage UserIDs"}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
IE_Wait>%IE[0]%,r
Wait>delay
Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"Export/Print "}
IE_ClickTag>%IE[0]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r
WaitWindowOpen>File Download
SetFocus>File Download
Year>yyyy
Month>mm
Day>dd
Hour>hh
Min>nn
Sec>ss
Let>filename=C:\Program Files\WebRecorder\Downloads\%yyyy%%mm%%dd%%hh%%nn%%ss%_http://www.testportal.com/
WaitWindowOpen>File Download
SetFocus>File Download
Wait>1
Send>s
WaitWindowOpen>Copying...
SetFocus>Copying...
Send>filename
Press Enter
WaitWindowClosed>Copying...
WaitWindowOpen>http://www.testportal.com/*
WaitWindowClosed>http://www.testportal.com/*
WaitWindowOpen>File Download
SetFocus>File Download
Label>end_script
Web Recorder 2 and Download
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Obviously I can't test your code as it requires your username and password.
The file download/save box has to be scripted "traditionally" via user input simulation as it is a dialog that pops up outside of the document. It cannot be scripted through IE's automation object. That's why all that WaitWindowOpen..SetFocus..etc code is there. You might need to tweak this code.
It should normally be something like:
WaitWindowOpen>File Download
SetFocus>File Download
Wait>1
Send>s
WaitWindowOpen>Save As
Send>filename
Press Enter
WaitWindowOpen>Download Complete
Press Esc
Depending on your system you may not need the last two lines if the box is set to close automatically. Also the title in the first two lines might need to be set instead to: File Download - Security Warning
The file download/save box has to be scripted "traditionally" via user input simulation as it is a dialog that pops up outside of the document. It cannot be scripted through IE's automation object. That's why all that WaitWindowOpen..SetFocus..etc code is there. You might need to tweak this code.
It should normally be something like:
WaitWindowOpen>File Download
SetFocus>File Download
Wait>1
Send>s
WaitWindowOpen>Save As
Send>filename
Press Enter
WaitWindowOpen>Download Complete
Press Esc
Depending on your system you may not need the last two lines if the box is set to close automatically. Also the title in the first two lines might need to be set instead to: File Download - Security Warning
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?