【问题标题】:Selenium IDE gives different result when running the same codeSelenium IDE 在运行相同的代码时给出不同的结果
【发布时间】: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


    【解决方案1】:

    尝试了很多事情......但最终在导致问题的语句解决问题之前暂停(几秒钟)。也许 selenium 请求没有同步,它在处理它之前向浏览器发送了一些请求(只是我的猜测!)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-26
      • 1970-01-01
      • 1970-01-01
      • 2018-11-18
      • 2021-08-23
      • 2021-09-01
      相关资源
      最近更新 更多