How can i right click the app's icon in the systemtray and select one of the popup menuitem using pywinauto?
I have my app on the Windows Desktop systemtray,which can't be loaded using the .exe file. So i have to right click on the systemtray icon and select one of the popup menu item in order to get the app's GUI.I was trying to achieve this using pywinauto using python 64 bit.
Here is my code.
app = Application(backend="uia").connect(path="explorer")
sys_tray = app.window(class_name="Shell_TrayWnd")
loc = sys_tray.child_window(title='App name').click()
This is changing the mouse position to the required App's icon,but its not right clicking on that and i want to select one menu item from that pop up also. how can i get this?
There is method
.click_input(button="right")
which moves real cursor and performs real click. In your case it would look so (on Windows 10 version 1803):Helpful debug prints are commented (all
.child_window
specifications have been just copied fromdump_tree()
output). There is also methodd.windows()
that is available for master branch only (pywinauto 0.6.6 is coming in nearest 2 weeks).