Image of the form on which I tested the code above:Īs you can see, the menuStrip1 is discovered, but I have not found a way to get to its children (Meniu 1, Meniu 2).Īny idea on how to find the menu and its children? Win32gui.EnumChildWindows(hwnd, getClasses, "a") Hwnd = win32gui.FindWindow(None, 'Form1') #recursive method to get all the controlsĬlasses.append(win32gui.GetWindowText(childHwnd)) I used the code below to try and find the menu. The test is required to access the menu of the application and click on one of the sub menu items. I am using python 3.4 with python for windows extension and pywinauto. It also introduces the use of the ContextMenuStrip control.I have to build an automation ui test for a WinForms application. Besides, this article discusses the use of two RichTextBox controls for pasting and copying of text. The normalized compression distance (NCD) is a mathematical tool to cluster any objects that are similar.
0 Comments
Leave a Reply. |