watir-webdriver checking table size rows and columns count
- 博客分类:
- watir-webdriver
- watir
Question:
I am starting the process of converting my WATIR scripts to use WATIR webdriver. There a couple of table methods I was using in my WATIR scripts to check the size (rows and columns) of a HTML table.
myTable.row_count
myTable.column_count
These methods don't exist in webdriver so I am looking for a good way of doing the same check.
For rows this seems to give the same result as the row_count method
myTable.rows.length
For column count of the table I've tried converting the table to an array of strings and getting the length of the first row, but the conversion to the string array is taking a while.
myCols = myTable.strings[0].length
Can anyone suggest a better/ quicker method of getting the table size?
Answers:
A1:Assuming the first row has the correct number of cells:
table.row.cells.length
发表评论
-
Get values from a select list using xpath [closed]
2012-04-04 16:50 0http://stackoverflow.com/que ... -
How do I build Watir tests for websites?
2012-04-04 16:14 0http://stackoverflow.com/que ... -
“TypeError: can't convert String into Integer” when trying to CTRL+click or SHIF
2012-04-04 15:33 0http://stackoverflow.com/que ... -
Using Watir, how can I select a radio control using both name and value?
2012-04-04 15:23 0q http://stackoverflow.com/q ... -
Selecting multiple options in select list with shift
2012-04-04 15:19 0Q http://stackoverflow.com/ques ... -
Drag-and-Drop in Watir
2012-04-04 15:15 0http://www.cheezyworld.com/2010 ... -
How to test onclick in this object without id
2012-04-04 15:13 0http://stackoverflow.com/que ... -
Browser Certificates
2012-04-04 15:01 0http://watirwebdriver.com/b ... -
selected_options returns blank from iframe
2012-04-04 14:48 0link http://stackoverflow.com/q ... -
How to handle tinyMCE when automating with watir-webdriver?
2012-04-04 14:28 0I'm evaluating Watir-webdr ... -
Browser url not returning new url
2012-04-01 17:55 0Qhttp://stackoverflow.com/quest ... -
Can not drive Opera with watir-webdriver on Windows XP
2012-04-01 17:53 0Qhttp://stackoverflow.com/quest ... -
why must I sleep or wait using watir-webdriver and firefox?
2012-04-01 17:50 0Qhttp://stackoverflow.com/quest ... -
Firefox 4 with watir webdriver: Need help using helperApps.neverAsk to save CSV
2012-04-01 17:39 0Q http://stackoverflow.com/q ... -
Watir Webdriver counting number of items in a UL list
2012-04-01 17:22 0Q http://stackoverflow.co ... -
finding the direct child of a tag in watir
2012-04-01 17:13 0Qhttp://stackoverflow.com/quest ... -
How to determine browser type (IE, FF, Chrome, etc.)
2012-04-01 16:59 0Q http://stackoverflow.com/que ... -
Wait methods for watir-webdriver unsuccessful with JS/AJAX and new page load (Er
2012-04-01 16:19 0http://stackoverflow.com/questi ... -
How to send text to a CKEditor WYSIWYG editor box using Watir-WebDriver
2012-04-01 16:14 0Q http://stackoverflow.com/ques ... -
How can I get Browser.text.include? to be case insensitive?
2012-04-01 15:57 0Q:http://stackoverflow.com/ques ...
相关推荐
ruby2.0.0+selenium-webdriver+watir-webdriver+rails离线备份,设置环境变量后可使用(未测试)
ChromeDriver 是一款以 Google Chrome 为环境测试网站的工具,现已实现对开源的 WebDriver 通路协议的支持,因此可以轻松与现有的 WebDriver 测试工具相整合。不熟悉 WebDriver 的用户可以参考 2009 年的项目发布...
Watir-WebDriver是基于ruby开发web驱动框架 double_click 双击事件 ie .sikuli_image(:image=>"1.png").double_click right_click 右击事件 exist? 判断用户元素是否存在 edit = ie.text_field(:name,"username") ...
WATIR-WEBDRIVER自动化测试指导
linux下离线安装watir-webdriver
压缩包中包含目前2013/01/19最新的安装文件,有rubyinstaller-1.9.2-p136、DevKit-tdm-32-4.5.1-20101214-1400-sfx、rubygems-1.8.24、watir-4.0.2、watir-webdriver-0.6.2等文件,并附上简略安装说明。
使用watir-webdriver删除百度空间所有文章的ruby脚本
wairt-webdriver.aip包含了chromedriver.exe、DevKit。、IEDriverServer.exe rubyinstaller-2.1.5.exe、Ruby语言入门教程v1.0这几个文件,是使用wati-webdriver进行安装部署以及ruby语言学些所需要的必不可少的资料...
watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn中文语言包 watir-cn...
它可以与watir和selenium-webdriver一起使用。 文献资料 项目是学习如何使用页面对象的第一个地方。 可以在上找到该项目的 。 要查看各个发行版之间的更改,请查看 要了解这种宝石的动机,请阅读此 有一本书...
watir-webdriver IE支持 IEDriverServer
ruby 自动化测试,watir是一个很不错的东西
Selenium Watir-Webdriver 的域特定页面组件页面组件首先对特定语义域进行建模,然后对浏览器代码进行建模。 Watir-Webdriver 是蜜蜂的膝盖! 现在使用域特定页面组件工厂!用法Domkey 是一个库,可帮助您构建用于...
Watir 提供了丰富的开发库,封装了包括浏览器窗口 windows,button, link, dialog, image, table, div 等绝大多数 HTML 对象类型,方便测试人员快速构建自动化测试程序。
开源自动化测试工具组合:Ruby+Watir安装 安装准备: 1. 工具安装包准备: Ruby官方下载地址:http://www.ruby-lang.org/zh_cn/downloads/,稳定版本Ruby 1.8.6 Watir下载地址:...
watir开发文档。包括帮助文档,示例等等
web自动化测试用的工具。需要先安装ruby
ruby 2.00 selenium webdriver,watir webdriver 备份打包
2.3.8...C:\>gem install watirSuccessfully installed firewatir-1.6.5Successfully installed nokogiri-1.4.3.1-x86-mswin32Successfully installed watir-1.6.53 gems installed... ////////// suggested by ...