If you need text properties based automation, pywinauto should help you. But there is no popular text-based cross-platform tool in Open Source field.

On macOs pyatom/ATOMac is good enough if you prefer Python (it requires some compilation during setup, but works well).

This is the big list of open source tools I'm maintaining.

  • PyAutoGUI has image recognition capabilities (like Sikuli or Lackey) but it's not text based (even no Win32 API support).
  • PyAutoIt bindings and AutoIt itself doesn't support MS UI Automation technology (only Win32 API).
  • The Getting Started Guide for pywinauto explains some differences between these 2 technologies and how to switch between them in pywinauto.

Anyway this field is complicated and you may face many challenges. Feel free to ask more detailed questions because this question is more suitable for
Software Recommendations StackExchange site.

Answer from Vasily Ryabov on Stack Overflow
🌐
StackShare
stackshare.io › stackups › pypi-pyautogui-vs-pypi-pywinauto
PyAutoGUI vs pywinauto | What are the differences? | StackShare
GUI Automation: PyAutoGUI focuses on image recognition-based automation, where it can locate and interact with GUI elements based on their visual appearance. It uses screenshot comparisons and pixel matching to identify and control UI components. On the other hand, pywinauto is specifically designed for automating Windows applications using their underlying accessibility features...
🌐
Reddit
reddit.com › r/python › pyautogui vs pywinauto
r/Python on Reddit: PyAutoGUI vs Pywinauto
April 13, 2018 -

What is the difference between the two and which one is better?

(I'm using windows 10. )

Discussions

Windows Desktop GUI Automation using Python - Sleep vs tight loop - Stack Overflow
For Windows only GUI automation pywinauto is a bit more full-featured (and pythonic). It waits some default time implicitly and allows explicit waiting (some CPU-non-intensive loop is inside: kind of 0.1 sec pause and quick check for changes, then waiting again). PyAutoGUI locateOnScreen function ... More on stackoverflow.com
🌐 stackoverflow.com
automated testing - Are there GUI test tool better than Selenium? - Software Quality Assurance & Testing Stack Exchange
I have read and heard from many peple that Selenium is used by many people. Do you know if there is a better tool than Selenium in relation to open source? Thanks! More on sqa.stackexchange.com
🌐 sqa.stackexchange.com
December 25, 2015
What are the differences of pyautogui, pywinauto, and swapy?
Out of the three, I've only used pyautogui. pyautogui is basically a library for automating mouse and keyboard inputs. It is cross-platform, which is its biggest advantage. It's also very simple to use. pywinauto automates actions in the Windows API, so it only works on Windows. It's main advantage is that it can "read" what controls a certain app possesses, and act on them. For example, let's say you want to open an app, fill in a field, and the click "OK". With pyautogui, you would need to know where the field and Ok button are, and enter their coordinates (in pixels) into your code. With pywinauto, your Application object will have an attribute for the text field and one for the OK button (found dynamically, which is pretty cool). More on reddit.com
🌐 r/Python
3
0
February 28, 2019
PyAutoGUI vs Pywinauto
PyAutoGUI gives you the option to send keyboard and mouse clicks and do screenshots, not much more. Pywinauto tries to let you interact with the element of a windows application, so also works, if the program is not in the foreground. I've played with Pywinauto and am not entirely happy. If you want to automate a complicated GUI program, one that contantly opens and closes windows and message boxes, their approach of locating the part of the program that you want to react to can drive you mad. I had to write a lot of try/catch code to get it to work at all. PyWinGUI alas isn't better for this usecase, but at least very easy to use. On windows 10 you also have the option of getting autohotkey (not python, but its own language) which does a much better job at automating, but has horrible syntax and no data structures... More on reddit.com
🌐 r/Python
6
9
April 13, 2018
🌐
SourceForge
sourceforge.net › software › compare › PyAutoGUI-vs-pywinauto
PyAutoGUI vs. pywinauto Comparison
Compare PyAutoGUI vs. pywinauto using this comparison chart. Compare price, features, and reviews of the software side-by-side to make the best choice for your business.
🌐
Medium
medium.com › @chriso2672 › discovering-pyautogui-b842222a1e8
Discovering PyAutoGUI. (and How Awesome Automation Is) | by Chris O'Malley | Medium
September 27, 2021 - Pywinauto is a module that automates the Windows GUI and has the ability to send mouse and keyboard actions to it. There is also Selenium for web browser scraping and automation. However PyAutoGui is a bit more fleshed out than Pywinauto and isn’t ...
🌐
Slashdot
slashdot.org › software › task automation software › pyautogui vs. pywinauto
Compare PyAutoGUI vs. pywinauto in 2026
Its primary function is to facilitate the sending of mouse and keyboard inputs to various Windows dialogs and controls. You can easily install pywinauto using either pip or conda. While Python is a powerful programming language, it has historically lacked automation tools that are truly Pythonic, with very few libraries created in Python itself.
🌐
Readthedocs
pywinauto.readthedocs.io › en › latest
What is pywinauto — pywinauto 0.6.8 documentation
PyAutoGui - a popular cross-platform library (has image-based search, no text-based controls manipulation).
Find elsewhere
🌐
GitHub
github.com › pywinauto › pywinauto › wiki › UI-Automation-tools-ratings
UI Automation tools ratings · pywinauto/pywinauto Wiki · GitHub
April 1, 2020 - pyautogui - 7 327 (+621) AutoHotkey (C++) - 5 958 (+392) Appium Desktop - 4 309 (+205) pywinauto - 3 705 (+211) WinAppDriver (C#) for Appium - 2 953 (+156) sikuli - 1 658 (+8) (SikuliX1 - 2 034 (+204)) Python-UIAutomation-for-Windows - 1 549 (+167) FlaUI - 1 442 (+148) TestStack.White (C#) - 1 019 (+3) autopy (Rust+Python) - 681 (+33) (autopy-legacy - 849) lackey - 571 (+13) (pure Python replacement for Sikuli) Winium.Desktop (C#) - 366 (+7) pyatom - 334 (+10) pyautoit - 225 (+13) appium-for-mac - 184 (+4) Guibot - 127 (+8) fMBT - 122 (+3) LDTP cobra - 104 (+0) RAutomation (Ruby) - 98 (+1) LDTP v2 - 94 ·
Author   pywinauto
🌐
GitHub
github.com › Husna-POYRAZ › python-automation-paint
GitHub - Husna-POYRAZ/python-automation-paint: Python Automation with PyAutoGUI and PyWinAuto · GitHub
Pywinauto and PyAutoGUI are Windows GUI automation library written python. They allows you to send mouse and keyboard actions to windows dialogs and controls.
Author   Husna-POYRAZ
Top answer
1 of 3
6

For Windows only GUI automation pywinauto is a bit more full-featured (and pythonic). It waits some default time implicitly and allows explicit waiting (some CPU-non-intensive loop is inside: kind of 0.1 sec pause and quick check for changes, then waiting again).

PyAutoGUI locateOnScreen function uses advanced analysis of the screenshot. That is why it's so CPU intensive (but cross-platform).

pywinauto example:

from pywinauto import Application

app = Application(backend="win32").start(u'your_app.exe')
app.MainWindow.menu_select(u'File->Open')

app.OpenDialog.Edit.set_edit_text(u'some path')
app.OpenDialog.Open.click()
app.OpenDialog.wait_not('visible', timeout=10)

new_main_window = app.window(title_re='^.* - The Software$')
new_main_window.wait('ready', timeout=15)

Getting Started Guide is a good starting point for learning pywinauto core concept.

2 of 3
2

I think you can use pyautogui.getAllWindows(). This function returns all windows and their handles. so you can check when the new window has been added. for example:

windows = pyautogui.getAllWindows()
windows_count = len(windows)
while True:
    current_windows = pyautogui.getAllWindows()
    if len(current_windows) != windows_count:
        break

Also, you can use the handle number of the desired window to activate the desired window and bring it to the foreground:

desired_window = pyautogui.Window(#enter window handle number)
desired_window.activate()

another way that I think is easier is pyautogui.getActiveWindowTitle(). This function returns the title of the active window. Maybe you can use that for break condition.

while True:
    title=pyautogui.getActiveWindowTitle()
    if title== "your desired window's title":
        break
Top answer
1 of 1
3

Selenium is an industry standard for web GUI. But desktop GUI automation is almost an untilled field. There are several disparate tools that are able to deal with few types of GUI. I know only one cross-platform open source project for GUI testing based on accessibility technologies (therefore text-based): it's LDTP. But in my mind the interface is really ugly. That's why LDTP is not so popular.

Really nice tools are not cross-platform. One of the docs point to some of them.

Python tools

  • pywinauto (https://github.com/pywinauto/pywinauto) is a very pythonic tool but it can manipulate only native GUIs on Windows (UI Automation API support is on the way)
  • PyAutoGui (https://github.com/asweigart/pyautogui) - it’s a cross-platform but there is no windows/controls manipulation at all.
  • AXUI (https://github.com/xcgspring/AXUI) - this is one of the wrappers around UI Automation API.
  • winGuiAuto (http://www.brunningonline.net/simon/blog/archives/winGuiAuto.py.html) another module using Win32 API.

    Other scripting language tools

  • Perl Win32::GuiTest (http://winguitest.sourceforge.net/)

  • Ruby Win32-Autogui (https://github.com/robertwahler/win32-autogui)
  • Ruby RAutomation (https://github.com/jarmo/RAutomation) - there are 3 adapters: Win32 API, UIA, AutoIt.
  • C# Winium.Desktop (https://github.com/2gis/Winium.Desktop)
  • others (http://www.opensourcetesting.org/functional.php)

    Other free tools

  • AutoIt (http://www.autoitscript.com/)

  • See collection at: https://github.com/atinfo/awesome-test-automation

Some tools use Machine Learning algorithms to find the elements on the screen by gold picture matching (Sikuli, PyAutoGUI), but they are still not reliable enough and can be chosen if you really need cross-platform solution or in some complicated cases where accessibility technologies are not available (GTK apps on Windows, for example).

P.S. I'm trying to keep some tools rating up-to-date if a popularity on GitHub/SO matters to you.

🌐
Testdriver
testdriver.ai › articles › top-12-alternatives-to-pyautogui-for-windows-macos-linux-testing
Top 12 Alternatives to PyAutoGUI for Windows/macOS/Linux Testing - TestDriver
September 24, 2025 - PyAutoGUI offers cross-platform reach but relies more on image and coordinate-based actions. For Windows applications, Pywinauto often reduces flakiness and maintenance.
🌐
Slashdot
slashdot.org › software › p › PyAutoGUI › alternatives
Top PyAutoGUI Alternatives in 2026
Its primary function is to facilitate the sending of mouse and keyboard inputs to various Windows dialogs and controls. You can easily install pywinauto using either pip or conda. While Python is a powerful programming language, it has historically lacked automation tools that are truly Pythonic, with very few libraries created in Python itself.
🌐
I Love Python
ilovepythonblog.wordpress.com › tag › pywinauto
pywinauto – I Love Python - WordPress.com
September 30, 2017 - Here I have used two Python libraries ( pyautogui , pywinauto ), which can be used to automate any windows application.
🌐
GitHub
github.com › pywinauto › pywinauto
GitHub - pywinauto/pywinauto: Windows GUI Automation with Python (based on text properties) · GitHub
pywinauto is a set of python modules to automate the Microsoft Windows GUI.
Starred by 6K users
Forked by 769 users
Languages   Python
🌐
GitHub
gist.github.com › GenevieveBuckley › 311e180e5539c80587437dfbf00d7903
Desktop GUI automation in Python · GitHub
windows_lettuce_pywinauto - BDD UI Automaton skeleton, using lettuce and pywinauto - https://github.com/johnstoj/windows_lettuce_pywinauto
🌐
Reddit
reddit.com › r/python › what are the differences of pyautogui, pywinauto, and swapy?
r/Python on Reddit: What are the differences of pyautogui, pywinauto, and swapy?
February 28, 2019 -

Do they all do different things? Do they work together to automate more complex really? Or are they all very similar just different brands of automation packages?

Can you list examples of the differences?

Top answer
1 of 2
2
Out of the three, I've only used pyautogui. pyautogui is basically a library for automating mouse and keyboard inputs. It is cross-platform, which is its biggest advantage. It's also very simple to use. pywinauto automates actions in the Windows API, so it only works on Windows. It's main advantage is that it can "read" what controls a certain app possesses, and act on them. For example, let's say you want to open an app, fill in a field, and the click "OK". With pyautogui, you would need to know where the field and Ok button are, and enter their coordinates (in pixels) into your code. With pywinauto, your Application object will have an attribute for the text field and one for the OK button (found dynamically, which is pretty cool).
2 of 2
1
Hello! I'm a bot! It looks to me like your post might be better suited for r/learnpython , a sub geared towards questions and learning more about python. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster. Show r/learnpython the code you have tried and describe where you are stuck. You can also ask this question in the Python discord , a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others. README | FAQ | this bot is written and managed by u/IAmKindOfCreative This bot is currently under development and experiencing changes to improve its usefulness
🌐
Medium
lundbird.medium.com › how-to-automate-windows-applications-with-autogui-626c7b452eed
How to automate windows applications with AutoGui | by Alex Lundberg | Medium
September 10, 2018 - Each of these have their own issues, whether that be complicated syntax for CodedUI, speed for PywinAuto, image recognition for Sikuli, or flexibility for PyAutoGUI.
🌐
Github-wiki-see
github-wiki-see.page › m › pywinauto › pywinauto › wiki › UI-Automation-tools-ratings
UI Automation tools ratings - pywinauto/pywinauto GitHub Wiki
June 4, 2022 - pyautogui - 7 327 (+621) AutoHotkey (C++) - 5 958 (+392) Appium Desktop - 4 309 (+205) pywinauto - 3 705 (+211) WinAppDriver (C#) for Appium - 2 953 (+156) sikuli - 1 658 (+8) (SikuliX1 - 2 034 (+204)) Python-UIAutomation-for-Windows - 1 549 (+167) FlaUI - 1 442 (+148) TestStack.White (C#) - 1 019 (+3) autopy (Rust+Python) - 681 (+33) (autopy-legacy - 849) lackey - 571 (+13) (pure Python replacement for Sikuli) Winium.Desktop (C#) - 366 (+7) pyatom - 334 (+10) pyautoit - 225 (+13) appium-for-mac - 184 (+4) Guibot - 127 (+8) fMBT - 122 (+3) LDTP cobra - 104 (+0) RAutomation (Ruby) - 98 (+1) LDTP v2 - 94 ·