当前位置:网站首页>Katalon使用script实现查询List大小
Katalon使用script实现查询List大小
2022-07-04 03:47:00 【春天的菠菜】
背景:自动化场景当中存在表格对象的位置是动态的,如果依据动态来获取呢,下图例子当中是对象位置在最后一个位置,所以我只要知道这一组元素对象大小即可。如果位置在其他,可以考虑适应循环来查询,欢迎关注交流
import com.kms.katalon.core.webui.driver.DriverFactory as DriverFactory
import org.openqa.selenium.WebDriver as Webdriver
import org.openqa.selenium.By as By
import org.openqa.selenium.WebElement as WebElement
'获取driver'
Webdriver driver = DriverFactory.getWebDriver()
'查找一组元素对象'
List elementsList_P = driver.findElements(By.xpath('//*tr/th/div'))
'这个只要查询操作在哪列'
int col_num = elementsList_P.size()
'这个就可以作为参数去引用了,例如XPATH'
println('总列长:' + col_num)在XPATH参照Katalon中控件的参数化_春天的菠菜的博客-CSDN博客
边栏推荐
- 三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量
- Calculate the odd sum of 1~n (1~100 as an example)
- Simple dialogue system -- text classification using transformer
- SQL語句加强練習(MySQL8.0為例)
- National standard gb28181 protocol platform easygbs fails to start after replacing MySQL database. How to deal with it?
- Mitsubishi M70 macro variable reading Mitsubishi M80 public variable acquisition Mitsubishi CNC variable reading acquisition Mitsubishi CNC remote tool compensation Mitsubishi machine tool online tool
- Third party login initial version
- Two sides of the evening: tell me about the bloom filter and cuckoo filter? Application scenario? I'm confused..
- JVM family -- monitoring tools
- Objective-C member variable permissions
猜你喜欢

深度优先搜索简要讲解(附带基础题)

Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/94/2bdc31ec05595dbbc8a7a8d6b22252.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush

Session learning diary 1

mysql数据库的存储

Objective-C description method and type method

如何有效远程办公之我见 | 社区征文

三年进账35.31亿,这个江西老表要IPO了

MySQL maxscale realizes read-write separation

Nbear introduction and use diagram
随机推荐
[PaddleSeg 源码阅读] PaddleSeg计算Dice
MySQL data query optimization -- data structure of index
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
super_ Subclass object memory structure_ Inheritance tree traceability
[paddleseg source code reading] paddleseg calculation dice
[.NET + mqtt]. Mise en œuvre de la communication mqtt dans l'environnement net 6 et démonstration de code pour l'abonnement et la publication de messages bilatéraux du serveur et du client
疫情来袭--远程办公之思考|社区征文
@Scheduled scheduled tasks
functools下的reduce函数
Consul of distributed service registration discovery and unified configuration management
Summary of Chinese remainder theorem
Third party login initial version
[paddleseg source code reading] paddleseg calculates Miou
Unity移动端游戏性能优化简谱之 画面表现与GPU压力的权衡
JDBC advanced
Defensive programming skills
选择排序与冒泡排序模板
JVM family -- monitoring tools
Learning video website
1289_FreeRTOS中vTaskSuspend()接口实现分析