差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

Both sides previous revision 前次修改
下次修改
前次修改
下次修改 Both sides next revision
rf:rf:staleelementreferenceexception [2018/01/16 16:24]
tony
rf:rf:staleelementreferenceexception [2018/01/16 16:28]
tony [Problem]
行 2: 行 2:
 ====== StaleElementReferenceException:​ Message: stale element reference: element is not attached to the page document ====== ====== StaleElementReferenceException:​ Message: stale element reference: element is not attached to the page document ======
 ===== Problem ===== ===== Problem =====
-這陣子把SeleniumLibrary更新到了3.0後,開始發生測試不穩定的問題其中一樣就是在呼叫Get Text時,發生StaleElementReferenceException:​ Message: stale element reference: element is not attached to the page document的問題。+這陣子把SeleniumLibrary更新到了3.0後,開始發生測試不穩定的問題其中一樣就是在呼叫Get Text時,發生StaleElementReferenceException:​ Message: stale element reference: element is not attached to the page document的問題。
 ===== How to resolve? ===== ===== How to resolve? =====
 與其說真的解決,不如說這是個workaround。 與其說真的解決,不如說這是個workaround。
 +<code bash>
 +Get Text
 +    [Arguments] ​   ${locator}
 +    ${text} ​   Wait Until Keyword Succeeds ​   2x    10ms    Selenium2Library.Get Text    ${locator}
 +    [Return] ​   ${text}
 +</​code>​
 ===== Reference ===== ===== Reference =====
   * [[https://​stackoverflow.com/​questions/​18225997/​stale-element-reference-element-is-not-attached-to-the-page-document|stale element reference: element is not attached to the page document]]   * [[https://​stackoverflow.com/​questions/​18225997/​stale-element-reference-element-is-not-attached-to-the-page-document|stale element reference: element is not attached to the page document]]