Sign in to follow this  
Followers 0
akarui

AutoIT3 Questions

4 posts in this topic

I am evaluating test tools to develop an automated test suite for a

GUI application. I came across with AutoIT3 which is capable of

Windows based GUI testing. I have following questions about AutoIT3's

capability for a test environment and requirements as below:

Application under test description:

1) GUI application runs on Windows XP (or may be in Vista)

2) This application is developed in XAML and C# on WPF (Windows

Presentation Foundation)

3) It is a standalone application (say, myGUIApp.exe) which can be

invoked either from DOS console or mouse click

4) After starting the application, it asks user to enter user ID and

password in two text fields on its first page

5) After authentication, the main page appears with all its interface

buttons and fields for further user actions

Questions:

1) Can I automate the no. 4 event above by AutoIT3 ?

2) As this application using .NET (WPF), does AutoIT3 supports it ?

Thanks in advance for your help.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

1.) Most likely yes. Autoit can script most GUI's and there are even UDF's for common ones.

2.) Not exactly. But autoit and .net provide similar functionality anyways, they are both provide wrappers for the windows API. Almsot anything you can do in .net you can do in autoit natively or by use of dll's. Also, certian .net objects expose themselfs via a COM interface which is directly accessable via Autoit (see http://www.autoitscript.com/forum/index.php?showtopic=38611)

Edited by evilertoaster

Share this post


Link to post
Share on other sites

1.) Most likely yes. Autoit can script most GUI's and there are even UDF's for common ones.

Thanks for the reply.

Please correct me, if I misunderstand your statement..........

You meant that, AutoIT3 script is capable to automate the entering of text in the user ID and password field of the GUI application that I mentioned.

Is there any sample code you could refer for similar kind of task ?

Share this post


Link to post
Share on other sites

I've been trying AutoIt with a .Net 2 app that we have in development and that requires users to login (at start and periodically).

I'd recommend reading up on the window info tool which will help you identify the control details for the text entry fields and any submission button.

You'd probably also want to look at things like ControlSend, ControlClick, ControlFocus and probably some more....

Oh you might want things like ShellExecute, WinExists, WinWaitActive and WinActivate too. These are also functions described in the help file.

you'll do something like

execute app;
wait for a specific window to become active/exists;
focus on first text box;
send text;
focus on 2nd text box;
send text;
click submission button;

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