python uiautomation40查找同名称控件数量
要查找同名称控件的数量,可以使用UIAutomation库中的findall函数来查找所有同名称控件,并返回一个列表。然后,使用len函数来获取列表的长度,即为同名称控件的数量。以下是示例代码:
import uiautomation as ua
# 查找同名称控件
controls = ua.findAll('控件名称')
# 获取同名称控件数量
count = len(controls)
print('同名称控件数量:', count)
原文地址: https://www.cveoy.top/t/topic/bZMw 著作权归作者所有。请勿转载和采集!