title: Python Tkinter GUI Automation
body: <p>I want to get into GUI automation in order to run tests on my own program. The Program I want to test is written in Python and uses Tkinter for the GUI. The testing code though does not necessarily have to be in python, CPP would also be alright.  I've done a bit of research and I am already facing a problem. </p>
  
  <p>From my research, I have found that "Windows Application Driver" is a free way to test GUI. there's also "WinAppDriver UI Recorder" which seems convenient to use with it. Additionally the `Inspect.exe' program from (In my case) "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86" is useful for getting information about the GUI elements. </p>
  
  <p>Assuming I have a small python code like this (only for testing):</p>
  
  <pre class="lang-py prettyprint-override"><code>from Tkinter import *
  import ttk
  
  class Test():
      def __init__(self):
          self.root = Tk()
          self.root.geometry("250x100")
          self.text = StringVar()
          self.text.set("Original Text")
          self.buttonA = Button(self.root, textvariable=self.text)
          self.buttonA.configure(text="test")
  
          self.buttonB = Button(self.root,
                                  text="Click to change text",
                                  command=self.changeText
                                )
          self.buttonA.pack(side=LEFT)
          self.buttonB.pack(side=RIGHT)
          self.root.mainloop()
  
      def changeText(self):
          self.text.set("Updated Text")
  
  app=Test()
  </code></pre>
  
  <p>When running the code and inspecting <code>buttonB</code> with <code>Inspect.exe</code> the name I get as a result is "" (empty). what way is there to change that name to something informational and useful like in the calculator example, where the '7' button's name is "Seven". Which then is used in the tester like this: </p>
  
  <p><code>self.driver.find_element_by_name("Seven").click()</code> </p>
  
  <p>which should look like this:</p>
  
  <p><code>self.driver.find_element_by_name("buttonB").click()</code></p>
  
  <p>for example in my case. </p>