当前位置:网站首页>Katalon uses script to query list size
Katalon uses script to query list size
2022-07-04 04:11:00 【Spinach in spring】
background : The location of table objects in the automation scene is dynamic , What if we get it based on dynamics , In the example below, the position of the object is at the last position , So I just need to know the size of this group of element objects . If the location is elsewhere , You can consider adapting to the loop to query , Welcome to exchange
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
' obtain driver'
Webdriver driver = DriverFactory.getWebDriver()
' Find a set of element objects '
List elementsList_P = driver.findElements(By.xpath('//*tr/th/div'))
' As long as the query operation is in which column '
int col_num = elementsList_P.size()
' This can be referenced as a parameter , for example XPATH'
println(' Total train length :' + col_num)
stay XPATH reference Katalon Parameterization of controls in _ Spinach blog in spring -CSDN Blog
边栏推荐
- 2022-07-03:数组里有0和1,一定要翻转一个区间,翻转:0变1,1变0。 请问翻转后可以使得1的个数最多是多少? 来自小红书。3.13笔试。
- 思考的小记录
- Wechat official account web page authorization
- LevelDB源码解读-SkipList
- Penetration practice - sqlserver empowerment
- Getting started with the go language is simple: go implements the Caesar password
- Graduation summary
- Go 语言入门很简单:Go 实现凯撒密码
- Is it safe to buy insurance for your children online? Do you want to buy a million dollar medical insurance for your children?
- 支持首次触发的 Go Ticker
猜你喜欢
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
There is a problem that the package cannot be parsed in the like project
'2'>' 10'==true? How does JS perform implicit type conversion?
分布式系统:what、why、how
函数计算异步任务能力介绍 - 任务触发去重
三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量
拼夕夕二面:说说布隆过滤器与布谷鸟过滤器?应用场景?我懵了。。
Flink学习6:编程模型
laravel admin里百度编辑器自定义路径和文件名
Katalon框架测试web(二十六)自动发邮件
随机推荐
Katalon framework tests web (XXI) to obtain element attribute assertions
Deep thinking on investment
Sales management system of lightweight enterprises based on PHP
“软硬皆施”,助力建成新型云计算数据中心
深度优先搜索简要讲解(附带基础题)
AAAI2022 | Word Embeddings via Causal Inference: Gender Bias Reducing and Semantic Information Preserving
Pytest multi process / multi thread execution test case
Pytest multi process / multi thread execution test case
Simple dialogue system -- text classification using transformer
投资深度思考
三年进账35.31亿,这个江西老表要IPO了
JDBC advanced
1289_FreeRTOS中vTaskSuspend()接口实现分析
渗透实战-guest账户-mimikatz-向日葵-sql提权-离线解密
CUDA basic knowledge
[paddleseg source code reading] paddleseg custom data class
CesiumJS 2022^ 源码解读[0] - 文章目录与源码工程结构
Typical applications of minimum spanning tree
Global exposure and roller shutter exposure of industrial cameras
Objective-C member variable permissions