Sign in to follow this  
Followers 0
nadah

automate a test application

7 posts in this topic

I am very new to this and wanted help to write a script to automate a test program,i basically need to open the program,select 2 checkboxes and execute it. i donno where to start.

Share this post


Link to post
Share on other sites



Welcome to the forum.

There are a few tutorials in the help file, but what you want to do is pretty simple and might be easy enough to use as a way to get you started learning a bit about AutoIt.

After installing AutoIt...

http://www.autoitscript.com/cgi-bin/getfil...it-v3-setup.exe

...please install the full/free version of SciTE4AutoIt3.

http://www.autoitscript.com/cgi-bin/getfil...iTE4AutoIt3.exe

Right mouse click on your desktop (or in a folder that you want to keep your scripts in) and select "new" from the OS context menu. Then select "AutoIt v3 Script".

Once the new file has been created, right click on it and select "Edit Script".

Once the SciTE editor has opened, find a blank line and type Run.

With the editor's cursor on or next to that word Run, press F1

That should open the help file for AutoIt right to the info that you need to complete the Run line of code for the application of interest.

Once you think that you have the Run line filled in like the help file says, bring the SciTE editor window into focus and press F5 to run the one line script that you just made. Your application of interest should start.

If it does not, copy/paste the "Run" line of code into your next post and we will attempt to see what went wrong.

Let's assume that it worked and you now want to select those 2 check boxes:

First, you need to make the script wait for the application to finish starting; for that we will use WinWait. Type WinWait under the Run line of code and press F1 for the help file info needed to complete that line of code.

It is very important that you get the window title of the application of interest correct for the WinWait line of code. You might want to look at the "info tool" named AutoIt Window Info. Go to Start > Programs (All Programs) > AutoIt v3 and then open AutoIt Window Info.

Bring the application of interest into focus.

Place the "info tool" over top of that window.

Click once somewhere in your application of interest.

The "info tool" should be showing you the title of the window for your app.

Double click on that title within the "info tool".

The title should now be in your OS clipboard.

Paste it into the correct spot in your WinWait line of code.

Your next lines of code can select those check boxes using ControlClick.

ControlClick might also be able to be used to execute the app.

Follow the same kinds of steps outlines for Run and WinWait that I mentioned above and see if you can complete the ControlClick line.

Post back with any questions or to point out stuff I failed to mention :-)


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

Wow you made me look like an unhelpful jerk Plato :P. Nadah, you really should follow the above mini-tutorial. It's actually rather precise for what you need, though not a complete step-by-step. If you need to learn more you can check the Autoit 1-2-3 tutorial or look at the code tutorial (STE) in my signature.

Share this post


Link to post
Share on other sites

Wow ...

You posted while I was composing my ramblings. It did look funny once I posted after you, but at least we agree on the functions to use :-)

Hopefully I did not insult the OP with some of the simpler instructions.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites

thank you ...i got it !!!

I am very new to this and wanted help to write a script to automate a test program,i basically need to open the program,select 2 checkboxes and execute it. i donno where to start.

Share this post


Link to post
Share on other sites

thank you ...i got it !!!

Great - enjoy AutoIt.

[size="1"][font="Arial"].[u].[/u][/font][/size]

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
Sign in to follow this  
Followers 0