Reputation: 4684
I want to use automated testing using autoit for my existing windows form based application. Currently looking at the autoit documentation I couldnt figure out how to start a existing windows application in vb.net and then use it for further automation.
Upvotes: 0
Views: 4178
Reputation: 1
Run("\\covmqaap01\CRE\CREST.exe")
Sleep(5000)
ControlClick( "CREST :: Login", "", 4 )
Sleep(3000)
; Login Details
ControlSend( "CREST :: Login", "", 4, "Ramana" )
Sleep(3000)
Send("{TAB 1}")
Sleep(3000)
ControlSend( "CREST :: Login", "", 3, "ramana@123" )
Sleep(2000)
ControlClick( "CREST :: Login", "", 1 )
Sleep(20000)
Upvotes: 0
Reputation: 4684
Did it by just calling the exe of that project Run("Z:\test\WindowsServices.Test\bin\Debug\WindowsServices.exe")
Upvotes: 0
Reputation: 27322
Someone correct me if I'm wrong but I don't think Autoit can invoke a .NET assembly so you will have to make your .net assembly COM Visible, and expose any functions you want to test using COM.
This link is about calling .NET assemblies from VB6 but the process is the same.
However I would love to know why you want to use AutoIt to automate testing when you could do anything that autoit can do (and more) in .NET?
Upvotes: 0
Reputation: 20044
Starting an application via Autoit:
http://www.autoitscript.com/autoit3/docs/tutorials/notepad/notepad.htm
Starting an application via VB.NET:
http://visualbasic.about.com/od/usingvbnet/a/prstrt.htm
Upvotes: 2