The robotframework page has been locate to the element, but the operation prompt is "element is no longer valid!

Source: Internet
Author: User

 

It has not been solved yet. Record it first.

 

 

 

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

 

 

However, using the FF browser is a pass

 

 

I have switched to the XPath and CSS positioning methods.

 

------------------- XPath --------------------

 

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

 

A similar Google case

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

The solution is:

 

I wocould 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 Answered Apr 1 at 17:44 dhimil
262

However, this step is already in use cases ···

Wait until page contains Element

The robotframework page has been locate to the element, but the operation prompt is "element is no longer valid!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.