查找子元素
<h1>功能</h1>
<p>此函数是获取某个元素节点下的子元素.返回对应索引的一个子元素,可以使用遍历循环返回所有子列表。</p>
<h1>输入</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>筛选</td>
<td>【字符串】XML字符串,指定集合中所有用户界面对象应符合的条件。</td>
<td>'tr'</td>
</tr>
<tr>
<td>元素</td>
<td>【TObject】元素表达式,获取到的元素返还对象所创建的变量。</td>
</tr>
<tr>
<td>选取器</td>
<td>【字符串】指明屏幕上/编辑选取器/表达式编辑器,根据需求选择。</td>
<td>'<html app=''IEXPLORE.EXE'' title=''百度新闻——海量中文资讯平台'' /><webctrl tag=''UL'' id=''header-link-wrapper'' />'</td>
</tr>
<tr>
<td>超时(毫秒)</td>
<td>【整型】指最长等待时间(毫秒),超过时间未运行就会报错</td>
</tr>
<tr>
<td>等待准备就绪</td>
<td>【整型】空/交互/完成</td>
<td>交互</td>
</tr>
<tr>
<td>裁剪区域</td>
<td>【TTarget】TRect/nil</td>
<td>TRect</td>
</tr>
</tbody>
</table>
<h1>选项</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>范围</td>
<td>【整型】使您能够设置集合中用户界面元素的范围,可用选项如下:子项、后代顶级、进程、线程。下级/ 全部下级,根据需求选择。</td>
<td>下级</td>
</tr>
<tr>
<td>索引</td>
<td>【整型】使您能够指定用户界面子元素的索引。</td>
<td>1</td>
</tr>
<tr>
<td>启用索引</td>
<td>【布尔型】选中该复选框时,将会根据索引查找用户界面子元素集合中的元素。默认情况下,该复选框是未选中状态。如果未选中该复选框,索引失效。根据需求勾选</td>
<td>是</td>
</tr>
</tbody>
</table>
<h1>输出</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>元素</td>
<td>【TUiElement】根据索引设置查找到的用户界面子元素集合中的元素,创建变量或者传入参数,获取到的元素返回对象所创建的变量。</td>
<td>element</td>
</tr>
<tr>
<td>子项</td>
<td>【TList<TUiElement】根据筛选器和范围设置查找到的所有用户界面子项。该字段仅支持枚举值<用户界面元素>变量。创建变量或者传入参数。</td>
<td>sList(创建变量,所有tr的列表集)</td>
</tr>
</tbody>
</table>
<h1>注意/说明</h1>
<p>1.该函数与【获取属性】、【遍历循环】函数搭配使用,将获取到的子元素通过【获取属性】输出子元素的属性值,用【遍历循环】函数将所有获取到的子元素遍历出来。
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/996bb09152f12d861124834a1c0ef324" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/0fbefbedaf4f3722de6837317ee631ec" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/d0c08e2844501fce3f0ca0995b28b13c" alt="" /></p>
<h1>相关函数</h1>
<p>【获取属性】、【遍历循环】函数</p>
<h1>示例/演示</h1>
<p><img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/b0e046da4c79834eeeab60e59e0082e5" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/830d8a99b74172890a0d4cffe9178a34" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/3fb84a1043c046fdc07fb5da01fab551" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/7db1acd56c7d18dddbb9db46ccf9f950" title="[组件[查找子元素]_20210429.db">组件[查找子元素]_20210429.db</a></p>