当前位置:网站首页>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
边栏推荐
猜你喜欢
idea修改主体颜色
There is a problem that the package cannot be parsed in the like project
选择排序与冒泡排序模板
Typical applications of minimum spanning tree
干货!基于GAN的稀有样本生成
AAAI2022 | Word Embeddings via Causal Inference: Gender Bias Reducing and Semantic Information Preserving
I was tortured by my colleague's null pointer for a long time, and finally learned how to deal with null pointer
Introduction to asynchronous task capability of function calculation - task trigger de duplication
The three-year revenue is 3.531 billion, and this Jiangxi old watch is going to IPO
[csrf-01] basic principle and attack and defense of Cross Site Request Forgery vulnerability
随机推荐
'2'>' 10'==true? How does JS perform implicit type conversion?
Objective-C member variable permissions
Brief explanation of depth first search (with basic questions)
functools下的reduce函数
Unity移动端游戏性能优化简谱之 画面表现与GPU压力的权衡
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?
分布式系统:what、why、how
ctf-pikachu-CSRF
Confession code collection, who says program apes don't understand romance
Database SQL statement summary, continuous update
SQL語句加强練習(MySQL8.0為例)
[paddleseg source code reading] paddleseg calculates Miou
Deep thinking on investment
毕业总结
三菱M70宏变量读取三菱M80公共变量采集三菱CNC变量读取采集三菱CNC远程刀补三菱机床在线刀补三菱数控在线测量
[PaddleSeg 源码阅读] PaddleSeg计算Dice
Katalon使用script实现查询List大小
深度优先搜索简要讲解(附带基础题)
深入浅出对话系统——使用Transformer进行文本分类
Perf simple process for multithreaded profile