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)"

最新文章

  1. plain framework 1 一款主要用于网络(游戏)开发的C/C++开源框架 安装篇 updated
  2. ZOJ-3946 Highway Project (最短路)
  3. 在python中如何设置当前工作目录
  4. mysql的相关操作
  5. Windows Phone 7 ListBox 列表项渐显加载动画学习笔记
  6. A题笔记(11)
  7. java数组学习
  8. Oracle11g R2学习系列 之十 解决EM不能用
  9. Android做法说明(3)---Fragment使用app袋或v4包解析
  10. Linux云服务器安装Elasticsearch
  11. ubuntu18.04 &amp; Windows10 双系统关机缓慢
  12. selenium跳过webdriver检测并模拟登录淘宝
  13. linux 端口占用
  14. PCB资料
  15. 一种简单有效的VBA源代码加密办法,支持64位宿主,适用于大部分VBA代码加密
  16. PHP的内存回收(GC)
  17. centos 打包报错Can&#39;t connect to X11 window server using &#39;:0.0&#39; as the value of the DISPLAY variable.
  18. hibernate的批量删除
  19. BlockingQueue-----多线程(一)
  20. 20155213 2016-2017-2 《Java程序设计》第八周学习总结

热门文章

  1. 【jmeter】NO-GUI模式运行的过程及报错解决方法(转)
  2. 第2节 storm实时看板案例:10、redis的安装使用回顾
  3. @@trancount什么意思(重要)
  4. re模块补充 configparse模块
  5. mysql#自定义序列
  6. php循环语句for while do while的用法
  7. os期末复习
  8. luogu P2761 软件补丁问题
  9. 1-8SpringBoot之切面AOP
  10. 吴裕雄 Bootstrap 前端框架开发——Bootstrap 辅助类:显示和隐藏内容