1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How to automate interactions with a Tkinter app without modifying its source code?

Discussão em 'Python' iniciado por Stack, Setembro 8, 2025.

  1. Stack

    Stack Membro Participativo

    I have a Python application built with Tkinter for its GUI. Right now, I want to automate interactions with this app without changing its source code.

    Is there a way or a tool on Windows that can help me locate and interact with Tkinter widgets from outside the app (similar to how UI automation works with WinForms or WPF apps)?

    I tried using Windows tools like WinSpy++.exe to analyze the window, but it only shows TkChild for every widget. I was expecting to see unique identifiers or widget names (like button text or widget IDs), so I could target them individually for automation. Instead, I just get generic TkChild classes, which makes it impossible to distinguish one widget from another.

    Continue reading...

Compartilhe esta Página