I'd like to click on "OK" to a popup javascript question.
Here is my html file (c:\temp\test.html):
<HTML>
<HEAD>
<SCRIPT LANGUAGE="javascript">
confirm( "Please click OK" );
</SCRIPT>
</HEAD>
</HTML>
and here is the starting of a basic vbs file to open the html file (c:\temp\test.vbs) :
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.Navigate ("file:///C:/temp/test.html")
How to click on the "Ok" button by completing the vbs file?
Edit : The html cannot be changed cause he's from a robotic hardware and the manufacturer don't allow anykind of change in their code (the .html sample code in my post is just an exemple of what kind of msgbox they use)
the "sendkey" option is a good alternative, but in my case i cannot do this on the server. the vbscript is a long harder than the vbscript i've post, and in experience the "sendkey" option does not give 100% exact result (if the msgbox does not displayed and i sendkey "enter", it can do critical stuffs). i'm going more in that kind of command line : ie.Document.all.Item("Ok").Click , but i didn't find an alternative for javascript "confirm" msgbox type.