Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Suppress/consume IE confirmation messages

$
0
0
Is there a way to suppress/consume an IE confirmation messages?

When I click a <label> element on our internal website, a confirmation message is produced asking for confirmation from the user to delete the record.  This message is modal, so until I manually close the message, my script is paused.

Edit: Or, is there a way to pass an IE dom object to another script, so it may perform the click?

like:
[ autoit ]      
$sPID = Run(@AutoItExe & ' /AutoIt3ExecuteLine "msgbox(1,1,IsObj ( ' & $oCell & ') )"')

Edit: Or (num2), is there a way to translate the 'uniqueid' back to the dom object through the _ie functions? $s = _IEPropertyGet($oCell,"uniqueid")

Short reproducer...notice that the msgbox will not display until you close the confirmation:

[ autoit ]      
  #include <IE.au3> $oIE = _IECreate () $sForm = "<form>" & @CRLF & _ "<input type=""button"" value=""Press to Confirm""" & @CRLF & _ "onclick=""confirm( 'Did you fill out a 27B/6?' )"">" & @CRLF & _ "</form>" _IEBodyWriteHTML($oIE, $sForm) $oDoc = _IEDocGetObj($oIE) $oCol = $oDoc.getElementsByTagName("input") For $oInput In $oCol  ConsoleWrite ($oInput.outerhtml & @CRLF)  _IEAction ($oInput, "click")  ConsoleWrite ("message from webpage was closed" & @CRLF) Next MsgBox(1,1,$sForm) $oIE.quit

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>