当前位置:网站首页>UiPath实战(08) - 选取器(Selector)
UiPath实战(08) - 选取器(Selector)
2022-07-03 04:32:00 【jie_ming514】
Uipath 中的选取器(Selector)
带通配符的选择器
利用通配符,您能够替换字符串中的零个或多个字符。在处理选取器中动态变化的属性时,通配符非常有用,常用通配符有如下两种。
- 星号 (*) – 替换零个或更多个字符
- 问号 (?) – 替换单个字符
使用如下:
带变量的选择器
有时候选择器的部分内容需要通过变量动态的决定时,如何在选择器中添加的变量呢。
可以通过 { {变量名}}
的形式插入变量。
选择器中使用正则表达式
假设我们要针对计算器应用程序创建自动化流程。但为达到本示例目的, 标签的值需在 0 到 2 之间进行调整。如不使用正则表达式搜索,则需构建两个选取器,每个选取器各对应于 标签的每个值,如下所示
name 标签中包含数字 0
<wnd app='applicationframehost.exe' appid='Microsoft.WindowsCalculator_8wekyb3d8bbwe!App' title='Calculator' />
<uia cls='LandmarkTarget' />
<uia automationid='CalculatorResults' name='Display is 0' role='text' />
name 标签中包含数字 2
< wnd app='applicationframehost.exe' appid='Microsoft.WindowsCalculator_8wekyb3d8bbwe!App' title='Calculator' />
<uia cls='LandmarkTarget' />
<uia automationid='CalculatorResults' name='Display is 2' role='text' />
<wnd app='applicationframehost.exe' appid='Microsoft.WindowsCalculator_8wekyb3d8bbwe!App' title='Calculator' />
<uia cls='LandmarkTarget' />
<uia automationid='CalculatorResults' name='Display is \d' role='text' matching:name='regex' />
matching:name=‘regex’ 属性指示选取器使用正则表达式识别 标签,而 <name=‘Display is \d’> 命令则会返回所识别 标签的所有数值。
边栏推荐
- JVM原理简介
- 商城系统搭建完成后需要设置哪些功能
- 2022 tea master (intermediate) examination questions and tea master (intermediate) examination skills
- 4 years of experience to interview test development, 10 minutes to end, ask too
- When using the benchmarksql tool to test the concurrency of kingbasees, there are sub threads that are not closed in time after the main process is killed successfully
- Mount NFS in kubesphere
- After reviewing MySQL for a month, I was stunned when the interviewer of Alibaba asked me
- vulnhub HA: Natraj
- C primre plus Chapter 10 question 6 inverted array
- [set theory] set identities (idempotent law | exchange law | combination law | distribution rate | De Morgan law | absorption rate | zero law | identity | exclusion law | contradiction law | complemen
猜你喜欢
A outsourcing boy's mid-2022 summary
Internationalization and localization, dark mode and dark mode in compose
Golang -- realize file transfer
Why should programmers learn microservice architecture if they want to enter a large factory?
vulnhub HA: Natraj
Auman Galaxy new year of the tiger appreciation meeting was held in Beijing - won the double certification of "intelligent safety" and "efficient performance" of China Automotive Research Institute
2022 a special equipment related management (elevator) analysis and a special equipment related management (elevator) simulation test
Php+mysql registration landing page development complete code
Function introduction of member points mall system
arthas watch 抓取入参的某个字段/属性
随机推荐
金仓数据库KingbaseES 插件kdb_date_function
Busycal latest Chinese version
I've been in software testing for 8 years and worked as a test leader for 3 years. I can also be a programmer if I'm not a professional
Smart contract security audit company selection analysis and audit report resources download - domestic article
After job hopping at the end of the year, I interviewed more than 30 companies in two weeks and finally landed
怎么用Kotlin去提高生产力:Kotlin Tips
Arthas watch grabs a field / attribute of the input parameter
[PCL self study: filtering] introduction and use of various filters in PCL (continuously updated)
Xrandr modifier la résolution et le taux de rafraîchissement
Summary of training competition (Lao Li's collection of questions)
Writing skills of multi plate rotation strategy -- strategy writing learning materials
金仓数据库KingbaseES 插件kdb_database_link
Php+mysql registration landing page development complete code
Library management system based on SSM
[set theory] binary relation (example of binary relation on a | binary relation on a)
Pyqt control part (II)
Why should programmers learn microservice architecture if they want to enter a large factory?
Basic use of continuous integration server Jenkins
一名外包仔的2022年中总结
Matplotlib -- save graph