AutoHotkey as an automation testing aid tool
In my company we use a web-based application written in Java and I'm evaluating if I could potentially use AutoHotkey to create procedures for automation testings in order to schedule and reduce testing run times that require human interaction.
Do you believe this is possible via AutoHotkey and what would you suggest as a starting point?
Thank you in advance for all your time and support.
Do you believe this is possible via AutoHotkey
Not only possible, but its probably your best option!
Whitebox and blackbox testing is amazing with AHK given the right set up.
There are a million places to start, but we need to know a little more to offer help. The web-page, you can use serveral existing scripts to read and write to web sites. You can use several existing scripts to run, edit, create files and scenarios.
The skys the limit really. Where did you want to start?
I am also only using AHK basic not AHK_L. The company I am working for had somestuff mainstreamed in AHK already and don't want to upgrade (The said if I wanted I could rewrite the thousands of lines of codes so that it'll be compatible with L, but that's not happening -___-)
have a look at the code, if you don't spot any DLL calls you can probably just upgrade. But you can simply try by download the ZIP and run it without installing ahk. AHK_L Ansi will defenitely work, unicode version might not if it has said DLL Calls.The company I am working for had somestuff mainstreamed in AHK already and don't want to upgrade
If you need any script-specific help, please post.
Also what Guest said, you don't need to install autohotkey, you can just "open with" the executable.
You could even make your script .ahkl and just open that always with ahk_L
I already looked into it, the basis and backbone scripts for the automation they already have in place is DLL Calls. Otherwise I would've upgraded just to make the emailing of test results easier -____-have a look at the code, if you don't spot any DLL calls you can probably just upgrade. But you can simply try by download the ZIP and run it without installing ahk. AHK_L Ansi will defenitely work, unicode version might not if it has said DLL Calls.The company I am working for had somestuff mainstreamed in AHK already and don't want to upgrade
Have you considered doing a Run mailto:?So my testing software is completed. And it works beautifully. My issues comes down to how the hell do I do email. I have the server name, IP, and port number and I need to send a file containing the test results to several emails, but I have no idea how to go about it. I've been poking around the forums for a better part of 9 hours of work time trying to find a solution and I haven't been able to find anything.
Run, mailto:[email protected]?subject=Subject&body=%testresults%and pick it up from there with an ifwinexist and do the keys needed to send the email.
Set objEmail = CreateObject("CDO.Message") objEmail.From = "[email protected]" objEmail.To = "[email protected]" objEmail.Subject = "Testing SMTP email script" objEmail.Textbody = "email body" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = number objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "server" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = number objEmail.Configuration.Fields.Update objEmail.Send
So I have a .ini file containing the email addresses I was to send to. I want to, using AHK read in those email addresses, and then attach the .ini file with the Results and send it. I never used VBS before so I'm currently clueless
VBSScript = %A_WorkingDir%\sendemail.vbs email := "email" iniread, BuildName, foldermonitor.ini, foldermonitor, buildname subject = %BuildName% Attachment = %A_WorkingDir%\TestResults.ini loop, 15 { iniread, email, file.ini, Email, name%A_index% RunWait, cscript.exe //nologo "%VBSScript%" %email% "%subject%" "%Attachment%",,Hide }
The above code in AHK sent to the VBS a list of 15 emails stored in a ini file.
emailTo = WScript.Arguments(0) emailSubject = WScript.Arguments(1) emailAttch = WScript.Arguments(2) Set objEmail = CreateObject("CDO.Message") objEmail.From = "Email" objEmail.To = emailTo objEmail.Subject = emailSubject objEmail.Textbody = "" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = number objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "server" objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") =number objEmail.Configuration.Fields.Update objEmail.AddAttachment emailAttch objEmail.Send