`
IvanLi
  • 浏览: 599712 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

selenium 测试ajax的关键

阅读更多

1: waitForCondition(contidtion, timeout)

2:selenium.browserbot.getCurrentWindow().document

下面是sample 用法

 

req_rsvn_01
open /itr/secure/index.jsp
clickAndWait link=Request & Manage Reservations (Week at a Glance)
waitForCondition selenium.browserbot.getCurrentWindow().document.forms[0].originIndex.options.length>1 10000
select originIndex label=!!Test Location Y - Test Y Town, NE
waitForCondition selenium.browserbot.getCurrentWindow().document.forms[0].destIndex.options.length>1||selenium.browserbot.getCurrentWindow().document.forms[0].destIndex.options[0].text!=’Select One’ 10000
select destIndex label=!!Test location Z - Test Z town , NE
waitForCondition selenium.browserbot.getCurrentWindow().document.forms[0].eqmtIndex.options.length>1||selenium.browserbot.getCurrentWindow().document.forms[0].eqmtIndex.options[0].text!=’Select One’ 10000
select eqmtIndex label=Container
clickAndWait submitBtn
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById(’testCheck0′)!=null 10000
click id=testCheck0
waitForCondition selenium.browserbot.getCurrentWindow().document.getElementById(’id[0].newStandbyCount’)!=null 10000
type id[0].newStandbyCount 1
keyUp id[0].newStandbyCount
clickAndWait requestButton
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics