Selenium2Library:Get Matching Xpath Count用法
Name:
Get Matching Xpath Count
Source:
Selenium2Library <test library>
Arguments:
[ xpath ]
Returns number of elements matching `xpath`
If you wish to assert the number of matching elements, use `Xpath Should Match X Times`.
================
${str} Get Matching Xpath Count //table[@class="layout layoutblod"]/tbody/tr
log ${str}
${str1} Get Matching Xpath Count xpath=//table[@class="layout layoutblod"]/tbody/tr[1]/td
log ${str1}
注意:参数是XPATH,所以直接写就行,不要写上XPATH=***,否则会报错:
Unable to locate an element with the xpath expression xpath=//table[@class="layout layoutblod"]/tbody/tr[1]/td because of the following error:\n[Exception... "The expression cannot be converted to return the specified type." code: "0" nsresult: "0x805b0034 (TypeError)"
最新文章
- plain framework 1 一款主要用于网络(游戏)开发的C/C++开源框架 安装篇 updated
- ZOJ-3946 Highway Project (最短路)
- 在python中如何设置当前工作目录
- mysql的相关操作
- Windows Phone 7 ListBox 列表项渐显加载动画学习笔记
- A题笔记(11)
- java数组学习
- Oracle11g R2学习系列 之十 解决EM不能用
- Android做法说明(3)---Fragment使用app袋或v4包解析
- Linux云服务器安装Elasticsearch
- ubuntu18.04 &; Windows10 双系统关机缓慢
- selenium跳过webdriver检测并模拟登录淘宝
- linux 端口占用
- PCB资料
- 一种简单有效的VBA源代码加密办法,支持64位宿主,适用于大部分VBA代码加密
- PHP的内存回收(GC)
- centos 打包报错Can&#39;t connect to X11 window server using &#39;:0.0&#39; as the value of the DISPLAY variable.
- hibernate的批量删除
- BlockingQueue-----多线程(一)
- 20155213 2016-2017-2 《Java程序设计》第八周学习总结