我是python pywinauto的新手,我想自动化一个简单的步骤,即单击Windows的“开始”按钮以打开控制面板,然后选择“管理工具”,最后要检查是否已选中该复选框。我陷入了如何单击Windows“开始”按钮的第一步?
答案 0 :(得分:1)
from pywinauto import Application
Application().start(r'mmc printmanagement.msc') # Warning! it spawns child process
# connect to that child process
app = Application(backend="uia").connect(path='mmc.exe')
# print main window with the title
print(app.windows())
app.PrintManagement.dump_tree() # print identifiers for further automation