如何在标签中编辑一些txt? [英] How to edit some txt in the tab?

查看:70
本文介绍了如何在标签中编辑一些txt?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

https://github.com/dubravcik/pbixrefresher-python/blob/master/pbixrefresher/pbixrefresher.py

我正在使用 pywinauto 软件包来自动化Power BI流程.进入 Edit Parameters (编辑参数)后,我是否知道如何编辑选项卡中的文本?例如,将"1"更改为"a",将"2"更改为"b",最后将"3"更改为"c".最后,单击确定".有什么主意吗?

I am using pywinauto package to automate the Power BI process. After I get into Edit Parameters, can I know how to edit the text in the tabs? For example, change '1' to 'a', change '2' to 'b' and lastly change '3' to 'c'. At the end, click 'OK'. Any idea?

我拥有的部分代码:

win = app.window(title_re = '.*Power BI Desktop')

win.Home.click_input()

win.Transformdata.click_input()

win.Editparameters.click_input()

推荐答案

您可以使用pywinauto set_text 函数编辑文本框

You can use pywinauto set_text function to edit the text box

下面是示例代码

Editable_TextBox = win.child_window(title=<UI_identifier>, control_type="Edit")
Editable_TextBox.set_text(<Text_you_set>)

或者您可以使用 type_keys 函数

win.Editparameters.type_keys(<Text_you_need_To_set>,with_spaces=True)

这篇关于如何在标签中编辑一些txt?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆