Jump to content

Automating GUI Testing With AutoIt - Emmanuel Katto - (Moved)


Recommended Posts

Hello AutoIt Community,

My name is Emmanuel Katto. I am currently working on a project that requires automating the testing of a desktop application, and I'm considering leveraging AutoIt for this purpose. However, I have a few specific questions :

  1. What are the best practices for identifying and interacting with GUI elements in a third-party application using AutoIt? I've seen references to functions like ControlGetHandle and ControlClick, but I’m unsure how to reliably find GUI controls, especially when dealing with dynamic elements. Are there any tools or techniques you recommend for capturing control IDs and properties effectively?

  2. I often encounter pop-up dialogs and alerts that interrupt the main workflow of the application I'm testing. What strategies do you use to handle these scenarios using AutoIt? Specifically, is there a way to create a script that waits for a pop-up and then interacts with it seamlessly?

  3. Timing issues have been a common hurdle in my automation efforts. How can I manage synchronization between AutoIt actions and the application's response? Are there built-in functions you recommend for ensuring that an action has completed before proceeding to the next step, or do you suggest implementing custom wait loops?

Any insights, code snippets, or examples would be immensely helpful!

Thank you in advance for your support!

Best regards,

Emmanuel Katto

Link to comment
Share on other sites

  • Moderators

Moved to the appropriate forum.

Moderation Team

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

1- au3info.exe tool for classic Windows applications.  If it cannot find controls then you will need to use UIASpy.au3 in UIAutomation

2- depends whether those popups are expected or not.  Look for the forum, there is a multitude of examples of it

3- depends on the application.  But usually you should see a new control, or a new state, or a new window (any change that is visible and can be monitored)

Search the forum with Google to find any snippet that could help you.

One good advice I can give you. When you have an issue and want help from the community, you should post code using an application that everyone here has access to (like Notepad).  It is quite hard for us to help when we do not own the application you are trying to automate...

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...