Hey guys,
After hours of research on here and the help file I am unable to get the above to work.
I have an image I have to click on the webform which then instantly initiates a JS popup with either an error or confirmation message in it.
The title is "Message from webpage" (sounds customised) but AutoIT can not find it.
Here is the code I'm having trouble with...
$oForms = _IEFormGetObjByName($oIE,"containerForm")
$oSite = _IEFormElementGetObjByName($oForms, "xml:/Shipment/@ReceivingNode")
$oCtnr = _IEFormElementGetObjByName($oForms, "xml:/Shipment/Extn/@UnitNo")
$oBill = _IEFormElementGetObjByName($oForms, "xml:/Shipment/Extn/@BillOfLading")
_IEFormElementSetValue($oSite,$site)
_IEFormElementSetValue($oCtnr,$ctnr)
_IEFormElementSetValue($oBill,$bill)
_IEImgClick($oForms,"action.gif")
if WinExists("Message from webpage") then
WinActivate("Message from webpage", "")
ControlClick("Message from webpage", "", "[CLASS:Button; TEXT:OK; Instance:1;]")
EndIf
Looking at the XML/AJAX source for the site reveals there is no control name for the image that is clicked, so I couldn't effectively implement the Example 2 in _IEAction that everyone seems to get pointed to.
I've tried everything from newbie-style sleeping and sending Enter to the _IEAction thing ending up with the above - any more ideas?