Hi i want to automate the login process for my colleagues, but initially browser creates a Modal dialog box and the subsequent operations continue on it. I am using below code
to automate, but not working it gives error.
<font class="small">Code:</font><hr /><pre>
Set objIE = CreateObject("InternetExplorer.Application")
objIE.visible = true
objIE.Document.All("txtUsername").Value = "chnuser"
objIE.Document.All("txtPassword").Value = "chnuser1"
I have searched more times but i couldn't get a solution, so please clear my doubts, Can we Automate Modal Dialog Box operations by using VBscript ? If is it possible please let me know. [img]/images/graemlins/confused.gif[/img]
No Tarun its not a windows dialog its a browser.(Take a look on attachment) After entering the URL IE creates an another instance and kills itself. Right now i managed by sleep and sendkey methods. But its not a worthy way. Apart from QTP(License issue) can we do this operations by vbscript?
I don't think you can automate this with VBScript alone. If you look at the object heirachy (QTP), you will see that the window is a child of the browser. I guess QTP must somehow trap the showwindow event (http://msdn.microsoft.com/en-us/library/aa768337(VS.85).aspx).
If it was a striaght forward task to automate an application using VBScript alone, then there would be no market for automation tools. If you dont have the budget for QTP, then I would look at free/open source solutions.