1

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.

1

1 Answer 1

0

TkInter apps are hard to automate with text properties. I'm not aware about any tools that can help you on Windows. There is only very old lib Tka11y (2009 on PyPI) that may work on Linux and macOS, but I didn't try it personally.

P.S. The question details are enough to me as a pywinauto maintainer. Please keep the question open. Though the current answer is "it is impossible to solve the problem on Windows".

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.