码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-10-16 13:02:42      阅读:934      评论:0      收藏:0      [点我收藏+]

标签:des   http   io   os   使用   ar   for   sp   div   

 

目前还未解决,先记录一下。

 

 

 

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

bubuko.com,布布扣

 

 

但是使用FF浏览器是pass的

bubuko.com,布布扣

 

 

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

 

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

bubuko.com,布布扣

 

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

bubuko.com,布布扣

 

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 

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

标签:des   http   io   os   使用   ar   for   sp   div   

原文地址:http://www.cnblogs.com/maple42/p/4028360.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!