kingtermite

Quick Questions....hope these aren't obtuse

6 posts in this topic

These may require a deep look to find the answer, so I hope I can get a quicker answer by just asking on here.

 

I am looking for a tool to help some software testers on my team be able to automate some tasks in the software. I knew of and stumbled across autohotkey while searching for the right tool, but looking closer how it derived from this project originally, I looked at this one too and think it might be a closer match to what I'd like to do.

 

Here's what I'm trying to accomplish, I hope someone can help me know if this workflow is possible.

 

I want to:

- automate some clicking, possibly typing, etc.... so that a user only needs to run the script and watch.

- be able to record a script (my testers aren't programmers, some don't even have a tech background). It needs to be able to allow them just basically hit a record button, do some stuff then stop recording.

- the recording of the script needs to tie to specific UIs and UI elements, not just "location on a page".

- be able to be run in a portable fashion (from a USB stick on a computer) ===> From what little I looked at so far, I think this is doable.

 

Can anyone tell me if this type of operation is possible and hopefully even be able to point me to a tutorial?

 

Secondary question: Is AutoIT "freeware" or "open source"? I think it would be preferable to using at my workplace if open source.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

AutoIt is quite possibly perfect for your requirements, but there are some snags.

Firstly, there used to be a tool called AU3Record which was designed to generate a script by recording user actions. The tool was removed from the package - I believe this is because it would also qualify as a keylogger, although this was never the intention. Secondly, AutoIt is closed source. It used to be open source, but that changed after AutoHotKey appeared. I don't know the full inside story. I have never used AutoHotKey and see no advantage in doing so.

This might leave you with a bit of a dilemma. I believe the AutoHotKey community have less regard for playing by the rules and are more likely to help you create scripts which might easily be classified as malware. Here we are much more cautious and will avoid posting code that could be used for illegal purposes regardless of the actual intent.

Since there are many legitimate uses for such scripts, such as in your case, all the functionality that you require exists. The only drawback being that you have to write the program yourself. We are happy to assist you with technical details about AutoIt and give hints, but if you ask 'How do I log every key pressed on the keyboard?', then you will not receive any help. Check the forum rules.

I can't answer your question fully, but I hope this gives you better insight and that you stick around and start writing code. Nothing wrong with your questions BTW!

Edited by czardas
1 person likes this

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I'd also like to add that if you're dealing with regular Windows (the OS) classes (buttons, checkboxes, tabs, etc) if you wanted to get in depth you could convert all of your recorded "Clicks" to ControlClicks.

I.e., when you start "recording" any instance where a user is recording the macro to click a button, type in some values, and click some more buttons could be converted to work in the background so that you're not working on the position of the button at all.

This is just a really quick example to show you what I'm talking about. This would make it work in the background, and you don't have to create a .au3 script for your recorder, you could save it however you'd like and just create an autoit exe to interpret it.

So you could have an ini file that would be written to like this

$sCurrentScript &= '[Step n]'
$sCurrentScript &= 'Function = ControlClick'
$sCurrentScript &= 'Parmas = CallArgArray|' & WinGetTitle(_WinAPI_GetParent($hControl)) & ', "", ' & $idControl & ', "Left", 1'

And then in your interpreter you could just use the Call function for everything

Call(Function read from ini file, Array created from Params from ini file)

Hopefully this isn't considered breaking the rules (I didn't add anything that's keyloggerish but it does record mouse clicks, which may be frowned upon). If it is I apologize, it isn't my intention.

Gui Example.au3

Gui Example.exe

Recorder Example.au3

Edited by InunoTaishou

Share this post


Link to post
Share on other sites

Thanks for your help. You've given me the info I need to move forward. I appreciate that. It sounds like AutoIT is more suited to my needs than AutoHotKey (as I kind of guessed by reading descriptions of the two).

 

Unfortunately, I've found some new info about our products that might make it not work after all. I'll have to investigate that. Our product has some knobs/buttons on it (as well as a touch screen) and apparently all those controls do not come in as window events, so I might not be able to automate those which will kind of invalidate what I'm trying to do.

 

Appreciate the help and explanations.

1 person likes this

Share this post


Link to post
Share on other sites

There are usually some ways around different control, depending on how they're presented. Please don't hesitate to give it a try, and post here if you run into any hurdles.

1 person likes this

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites
9 minutes ago, JLogan3o13 said:

There are usually some ways around different control, depending on how they're presented. Please don't hesitate to give it a try, and post here if you run into any hurdles.

Yeah...I talked to some of the devs of the full automation software yesterday. Those other controls have test hooks for each control, so it's possible, but it might be more than we plan on investing for this.

 

I think we were hoping for a simple record and playback tool for the testers to use, particularly for regression type scenarios. I'll go back to my manager to see if he wants us (meaning me - the only dev on the team) to start working this angle or not.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now