這是本文件的舊版!
StaleElementReferenceException: Message: stale element reference: element is not attached to the page document
Problem
這陣子把SeleniumLibrary更新到了3.0後,開始發生測試不穩定的問題;其中一樣就是在呼叫Get Text時,發生StaleElementReferenceException: Message: stale element reference: element is not attached to the page document的問題。
How to resolve?
與其說真的解決,不如說這是個workaround。
Get Text [Arguments] ${locator} ${text} Wait Until Keyword Succeeds 2x 10ms Selenium2Library.Get Text ${locator} [Return] ${text}
Reference