查找文本位置
<h1>功能</h1>
<p>在用户界面元素中搜索一个给定字符串,并返回另一个用户界面元素,该元素将剪切区域设置为给定字符串的屏幕位置。</p>
<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>
</tr>
<tr>
<td>选取器</td>
<td>【字符串】指明屏幕上/编辑选取器/表达式编辑器</td>
<td>根据喜好选择</td>
</tr>
<tr>
<td>超时</td>
<td>【整数】指最长等待时间(毫秒),超过时间未运行就会报错</td>
</tr>
<tr>
<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>【TUElement】您正在查找的字符串所在的用户界面元素。该字段仅支持用户界面元素变量。</td>
<td>位置</td>
</tr>
</tbody>
</table>
<h1>选项</h1>
<table>
<thead>
<tr>
<th>名称</th>
<th>说明</th>
<th>示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>格式化文本</td>
<td>【Boolean】如果选中此复选框,则保留选定文本的屏幕布局。</td>
</tr>
</tbody>
</table>
<h1>注意/说明</h1>
<p>不能获取浏览器网页中的文本。</p>
<h1>相关函数</h1>
<p>无</p>
<h1>示例/演示</h1>
<p>函数设置:
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/239c3b01e8e76753b9747fd8cc69c097" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/358288911ef0fc2a44f77fb769a53568" alt="" />
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/255b9f11c920cc0c5f5247e62db3cf77" alt="" />
函数执行效果如下:
<img src="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/bd473a49357d6d0dc2aff2ea4390ea2b" alt="" /></p>
<h1>示例附件</h1>
<p><a href="https://www.showdoc.com.cn/server/api/attachment/visitfile/sign/2a4874889de0c124ae605d394e2e17b5" title="[组件[查找文本位置]_20210427.db">组件[查找文本位置]_20210427.db</a></p>