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.
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
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?
Did it by just calling the exe of that project Run("Z:\test\WindowsServices.Test\bin\Debug\WindowsServices.exe")
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)
精彩评论