Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can QM or La use UI automation to control the TK GUI?
#1
I've tried using QM or LA to control a Tkinter GUI button via UI automation in Python, but it always fails. Has anyone successfully used UI automation to interact with Tkinter GUIs this way?

python code:

import tkinter as tk

def on_click():
    label.config(text="test ok!")

root = tk.Tk()
root.title("MyTkWindow")
root.geometry("300x200")

entry = tk.Entry(root, name="myentry")
entry.pack(pady=10)

btn = tk.Button(root, text="Button", name="mybutton", command=on_click)
btn.pack(pady=10)

label = tk.Label(root, text="", name="mylabel")
label.pack(pady=10)

root.mainloop()


Forum Jump:


Users browsing this thread: 1 Guest(s)