During this process a dialog appears titled 'Windows Internet Explorer', stating that the current page is asking to close the window, with 'yes' and 'no' buttons, 'yes' in focus. This dialog does not appear when generating the script with WebRecorder (which I think runs its own browser).
When MacroScheduler users IE7, the dialog appears.
I've added 'WaitWindowOpen', etc. to send keystrokes to close the window but they have no effect. The code executes when stepped through with the debugger but subsequently hangs (crashes) on the next
Code: Select all
'LibFunc>hIE,WaitIE,r,%IE[2]%'
I can manually click on the 'yes' button to close the dialog but there is no further response from the script.
I believe similar behaviour has been seen before in topic 3247 (How to click ok button in web page) but the FormFill/Submit solution does not work here.
I've appened part of the script below. I'd be interested to know if there is a solution for IE7 (or if I am missing something obvious!).
Code: Select all
Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>FieldName={"txtUsername"}
Let>FieldValue={"optimus"}
LibFunc>hIE,FormFill,r,%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,0
Let>FrameName={""}
Let>FormName={"frmLogin"}
Let>FieldName={"txtPassword"}
Let>FieldValue={"xxxxxx"}
// removed clicktag call and added submit to this FormFill call
LibFunc>hIE,FormFill,r,%IE[2]%,str:FrameName,str:FormName,str:FieldName,str:FieldValue,submit
// added manually
Let>WW_TIMEOUT=5
WaitWindowOpen>Windows Internet Explorer
SetFocus>Windows Internet Explorer
Wait>1
// have also tried Press Enter
// Enter and Alt-y both work fine outside of script!
Press ALT
Send>y
Wait>1
Release ALT
// script hangs here
LibFunc>hIE,WaitIE,r,%IE[2]%
Wait>delay
// commented out manually, why no %% around IE instance?
//libFunc>hIE,WaitNewIE,IE[3],0
//libFunc>hIE,WaitIE,r,IE[3]
LibFunc>hIE,WaitIE,r,%IE[3]%
Wait>delay
// form in new window
Let>FrameName={""}
Let>FormName={"frmSupplierAlertList"}
Let>TagValue={"btnContinue"}
LibFunc>hIE,ClickTag,r,%IE[3]%,str:FrameName,str:FormName,INPUT,NAME,str:TagValue
LibFunc>hIE,WaitIE,r,%IE[3]%
Wait>delay