【发布时间】:2012-12-07 03:49:48
【问题描述】:
我是 Selenium 的新手,只是在玩 IDE。我有一个在我的机器上本地运行的网站,它有一个 IFrame 和一些弹出窗口。以下代码在中速模式或慢速模式下运行得很好,但在快速模式下运行时失败,它会给出错误(见下面的第 15 行)。即使我尝试保留等待语句以使事物同步。
另外请注意,相同的代码在第 9 行执行得很好,无论运行速度慢还是快。
01 open /default.aspx
02 type id=loginContent_txtPassword xxxx
03 clickAndWait id=loginContent_btnSet
04 windowFocus
05 click //div[@id='lBar_leftItem_4']/a
06 waitForFrameToLoad aframe 30000
07 selectFrame aframe
08 click css=img[title="Properties"]
09 waitForPopUp doc 30000
10 selectWindow name=doc
11 close
12 selectWindow null
13 selectFrame aframe
14 click css=img[title="Properties"]
15 waitForPopUp doc 30000 ***[error] can't access dead object**
16 selectWindow name=doc
17 verifyText id=popupContent_lblOwner XYZ*
18 close
【问题讨论】:
标签: selenium-ide