Thrown when a reference to an element is now "stale". Stale means the element no longer appears on the DOM of the page. Possible causes of StaleElementReferenceException include, but not limited to: * You are no longer on the same page, or the page may have refreshed since the ele
| 101 | |
| 102 | |
| 103 | class StaleElementReferenceException(WebDriverException): |
| 104 | """Thrown when a reference to an element is now "stale". |
| 105 | |
| 106 | Stale means the element no longer appears on the DOM of the page. |
| 107 | |
| 108 | |
| 109 | Possible causes of StaleElementReferenceException include, but not limited to: |
| 110 | * You are no longer on the same page, or the page may have refreshed since the element |
| 111 | was located. |
| 112 | * The element may have been removed and re-added to the screen, since it was located. |
| 113 | Such as an element being relocated. |
| 114 | This can happen typically with a javascript framework when values are updated and the |
| 115 | node is rebuilt. |
| 116 | * Element may have been inside an iframe or another context which was refreshed. |
| 117 | """ |
| 118 | |
| 119 | def __init__( |
| 120 | self, |
| 121 | msg: Any | None = None, |
| 122 | screen: str | None = None, |
| 123 | stacktrace: Sequence[str] | None = None, |
| 124 | ) -> None: |
| 125 | with_support = f"{msg}; {SUPPORT_MSG} {ERROR_URL}#staleelementreferenceexception" |
| 126 | |
| 127 | super().__init__(with_support, screen, stacktrace) |
| 128 | |
| 129 | |
| 130 | class InvalidElementStateException(WebDriverException): |
no outgoing calls