robotframework 页面已经locate到元素 但是操作提示element is no longer valid!

 

已经解决,修改三方库或者升级为IE9

 

 

 

Text Edit

 

*** Settings ***
Library           Selenium2Library


baidu_xpath
    open browser    http://10.11.20.117:9500/poc/    ie
    sleep    3
    maximize browser window
    Wait Until Page Contains Element    id=Login
    click element    id=Login
    sleep    20

 

 

但是使用FF浏览器是pass的

 

 

换过 Xpath 跟 CSS的定位方式依然跪

 

-------------------Xpath--------------------

 

--------------------CSS------------------------

 

google的一个类似案例

http://stackoverflow.com/questions/22788089/element-is-no-longer-valid-freeze-in-ie8

给的解决方法是

 

I would suggest you check this link http://docs.seleniumhq.org/exceptions/stale_element_reference.jsp.

In your case, you clicked a button, found the element and then page changed due to the previous click action. Thus you got "Element is not valid".

This might help: wait for page load in selenium

share|improve this answer

 但是在用例中已经有了这个步骤···

Wait Until Page Contains Element 

posted @ 2014-10-16 11:22  从小不打伞  阅读(2616)  评论(0编辑  收藏  举报