当前位置:网站首页>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
边栏推荐
- 新型数据中心,助力加快构建以数据为关键要素的数字经济
- logistic regression
- Cesiumjs 2022^ source code interpretation [0] - article directory and source code engineering structure
- 【CSRF-01】跨站请求伪造漏洞基础原理及攻防
- Spa in SDP
- [book club issue 13] multimedia processing tool ffmpeg tool set
- [csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability
- pytest多进程/多线程执行测试用例
- 图解网络:什么是热备份路由器协议HSRP?
- [paddleseg source code reading] normalize operation of paddleseg transform
猜你喜欢

Confession code collection, who says program apes don't understand romance

Rhcsa-- day one

Es network layer

02 specific implementation of LS command

The maximum expiration time of client secret in azure ad application registration is modified to 2 years

Getting started with the go language is simple: go implements the Caesar password

Go 语言入门很简单:Go 实现凯撒密码

1289_ Implementation analysis of vtask suspend() interface in FreeRTOS

SQL語句加强練習(MySQL8.0為例)

laravel admin里百度编辑器自定义路径和文件名
随机推荐
[PaddleSeg 源码阅读] PaddleSeg Transform 的 Normalize操作
毕业设计:设计秒杀电商系统
图解网络:什么是热备份路由器协议HSRP?
三年进账35.31亿,这个江西老表要IPO了
Activiti7 task service - process variables (setvariable and setvariablelocal)
EV6 helps the product matrix, and Kia is making efforts in the high-end market. The global sales target in 2022 is 3.15 million?
[paddleseg source code reading] paddleseg calculates Miou
Sales management system of lightweight enterprises based on PHP
Select sorting and bubble sorting template
还原窗口位置的微妙之处
Pandora IOT development board learning (HAL Library) - Experiment 6 independent watchdog experiment (learning notes)
02 specific implementation of LS command
【罗技】m720
Infiltration practice guest account mimikatz sunflower SQL rights lifting offline decryption
Illustrated network: what is the hot backup router protocol HSRP?
三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量
Smart subway | cloud computing injects wisdom into urban subway transportation
pytest多进程/多线程执行测试用例
Mindmanager2022 efficient and easy to use office mind map MindManager
[paddleseg source code reading] paddleseg calculation dice