Selenium_RC使用技巧_v10.docVIP

  • 9
  • 0
  • 约1.09万字
  • 约 14页
  • 2016-12-29 发布于重庆
  • 举报
Selenium RC使用技巧 版本:V1.0 日期:2008-8-5 作者:夏辉(xiahui_1@163.com) 本文档所有例子,请参照”jspNews”项目。 1、HTML元素定位 描述分为以下五种方式: 1、以ID号定位 selenium.click(“id=idOfThing”); 2、以名称定位 selenium.click(“name=nameOfThing”); 3、以Xpath定位,Xpath是一套标准规范 selenium.click(“xpath=//img[@alt=The image alt text]”); 4、以DOM定位 selenium.click(“dom=document.images[56]” ); 5、以link方式定位 selenium.click(“link=Test Page For Selenium”); 6、以CSS方式定位 selenium.click(“css=span#firstChild”); 2. frameset操作技巧 2.1 获取当前frameset网页 比如当前网页(index.html)是frameset网页,frameset布局如下: 当显示index.html时,可以通过下列语句判断是否是index.html网页: this.sel.ope

文档评论(0)

1亿VIP精品文档

相关文档