AirtestIDE-连接windows窗口

IDE连接窗口方法

1.选定窗口(嵌入IDE中)

Windows窗口连接 - 选择游戏画面 - 选择窗口(窗口大小需在选定前调整)

 

2. 搜索窗口(嵌入IDE中)

Windows窗口连接 - 搜索窗口 - 选择列表中的窗口

 

 3. 不嵌入连接

选项 - 设置 - 勾选无嵌入连接 - 在通过1跟2方法选择窗口

 

 

4. 桌面模式

Windows窗口连接 - 连接桌面(将整个桌面截图)

 

 

脚本连接窗口方法

1. 使用窗口句柄

auto_setup(__ file__.devices=["Windows:///133194"]) #其中133194就是窗口句柄

窗口句柄是每个Windows窗口对象拥有的独一无二的32位无符号整数,而且每次打开窗口,句柄的数值都会变化

 

2. 使用正则表达式

auto_setup(__file__. devices=["Windows://?title_re=xxx.*“])

大多数情况下,窗口的titIe比较不容易变化,所以我们可以写一个正则表达

 

3. 连接桌面

auto_setup(__file__. devices=["Windows:///“])

如果不需要指定某个窗口应用,我们可以直接连接整个桌面来做自动化

posted @ 2022-02-14 10:32  SiNanhong  阅读(861)  评论(0编辑  收藏  举报