How to set value in text box using pywinauto?

不想你离开。 提交于 2019-12-23 01:05:13

问题


I am new to pywinauto and I don't know how to use control identifiers.

How would I set No. of loops: to 99999?


回答1:


For dynamic edit box you can use label text as a part of identifier. Examples:

app.WindowName.No__of_loops_Edit.set_text('99999')
# or
app.WindowName['No. of loops:Edit'].set_text('99999')

# for more realistic typing char by char:
app.WindowName['No. of loops:Edit'].type_keys('99999')

It's described in more details in the Getting Started Guide (section "How to know magic attribute names").



来源:https://stackoverflow.com/questions/41343648/how-to-set-value-in-text-box-using-pywinauto

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!