当前位置:网站首页>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
边栏推荐
- 基于PHP的轻量企业销售管理系统
- “软硬皆施”,助力建成新型云计算数据中心
- 01 QEMU starts the compiled image vfs: unable to mount root FS on unknown block (0,0)
- [paddleseg source code reading] paddleseg calculation dice
- 用于TCP协议交互的TCPClientDemo
- CUDA basic knowledge
- Rhcsa-- day one
- 量子力学习题
- 数据库SQL语句汇总,持续更新......
- 02 specific implementation of LS command
猜你喜欢

Pointer array and array pointer

【CSRF-01】跨站请求伪造漏洞基础原理及攻防

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

MySQL maxscale realizes read-write separation

Reduce function under functools

Detailed explanation of PPTC self recovery fuse

毕业设计:设计秒杀电商系统

Katalon框架测试web(二十六)自动发邮件

Msgraphmailbag - search only driveitems of file types

The maximum expiration time of client secret in azure ad application registration is modified to 2 years
随机推荐
Myslq delete followed by limit
01 QEMU starts the compiled image vfs: unable to mount root FS on unknown block (0,0)
Pandora IOT development board learning (HAL Library) - Experiment 6 independent watchdog experiment (learning notes)
指针数组和数组指针
Smart subway | cloud computing injects wisdom into urban subway transportation
Idea modify body color
[book club issue 13] multimedia processing tool ffmpeg tool set
I Build a simple microservice project
Rhcsa-- day one
渗透实战-guest账户-mimikatz-向日葵-sql提权-离线解密
[csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability
线程常用的方法
Storage of MySQL database
Es network layer
Sales management system of lightweight enterprises based on PHP
毕业总结
Balance between picture performance of unity mobile game performance optimization spectrum and GPU pressure
Database SQL statement summary, continuous update
[paddleseg source code reading] paddleseg calculates Miou
1289_FreeRTOS中vTaskSuspend()接口实现分析