Hi,
I'm automating a webpage analyser. I can currently get the webpage to load & reload, analyse the various info & press the Submit button. However, the page requires a confirmation prior to sending the form. It calls the confirm() function which pops-up a small window with Ok or Cancel. I want to automate the clicking of 'Ok'. Any ideas?
Some simplified code segments below....
Thanks,
Rod
I'm automating a webpage analyser. I can currently get the webpage to load & reload, analyse the various info & press the Submit button. However, the page requires a confirmation prior to sending the form. It calls the confirm() function which pops-up a small window with Ok or Cancel. I want to automate the clicking of 'Ok'. Any ideas?
Some simplified code segments below....
Thanks,
Rod
Code:
Set IE = WScript.CreateObject("InternetExplorer.Application", "IE_")
IE.Navigate "[URL unfurl="true"]http://www.mysite.com"[/URL]
openBrowser = IE
' Search all the items in the webpage form
For i = 0 to IE.document.forms(0).length-1
' Is the item a Submit button?
If IE.document.forms(0).item(i).value = "Submit" Then
' Focus on the submit button
IE.document.forms(0).item(i).focus
' Click the submit button
IE.document.forms(0).item(i).click
' Confirm box will come up here & I want to press 'Ok'
Something in here to press the popup Ok button ???
End If
Next
End If
Next