【发布时间】:2019-12-11 18:31:09
【问题描述】:
我能够在父窗口上执行按钮点击,但我不确定如何在子窗口的按钮上执行点击操作。
app = Application().connect(path=newPath)
app.name_of_the_parent_window.draw_outline()
app.name_of_the_parent_window.print_control_identifiers()
app.name_of_the_parent_window.Button6.click() #this click will open a new window with yes & no buttons.I would like to click on yes button but I am unable to do that
print(app.windows()[0].children(title_re=".*would you like to reset.*", class_name="Button")) #this prints the information about buttons
image of the result of the above print command
我可以看到 Yes 是一个按钮。但我不知道在按钮上执行 click() 的方法是
我尝试了以下命令,但失败并显示错误消息 error mesage image
请告诉我如何在子窗口的按钮上执行点击操作。
【问题讨论】:
标签: python-3.x button click pywinauto