diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md index 8bc3e7c6eede..32aee5a1714f 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md @@ -97,3 +97,15 @@ and have destroyed the context in which the element was located. You can't just relocate it from the current context, and you can't switch back to an active context where it is valid. If this is the reason for your error, you must both navigate back to the correct location and relocate it. + +## Invalid SessionId Exception + +Sometimes the session you're trying to access is different than what's currently available + +### Likely Cause + +This usually occurs when the session has been deleted (e.g. `driver.quit()`) or if the session has changed, like when the last tab/browser has closed (e.g. `driver.close()`) + +### Possible Solutions + +Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can. diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md index 00af5d46c33d..17f3179eb5ed 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md @@ -91,3 +91,15 @@ and have destroyed the context in which the element was located. You can't just relocate it from the current context, and you can't switch back to an active context where it is valid. If this is the reason for your error, you must both navigate back to the correct location and relocate it. + +## Invalid SessionId Exception + +Sometimes the session you're trying to access is different than what's currently available + +### Likely Cause + +This usually occurs when the session has been deleted (e.g. `driver.quit()`) or if the session has changed, like when the last tab/browser has closed (e.g. `driver.close()`) + +### Possible Solutions + +Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can. diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md index 00af5d46c33d..17f3179eb5ed 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md @@ -91,3 +91,15 @@ and have destroyed the context in which the element was located. You can't just relocate it from the current context, and you can't switch back to an active context where it is valid. If this is the reason for your error, you must both navigate back to the correct location and relocate it. + +## Invalid SessionId Exception + +Sometimes the session you're trying to access is different than what's currently available + +### Likely Cause + +This usually occurs when the session has been deleted (e.g. `driver.quit()`) or if the session has changed, like when the last tab/browser has closed (e.g. `driver.close()`) + +### Possible Solutions + +Check your script for instances of `driver.close()` and `driver.quit()`, and any other possible causes of closed tabs/browsers. It could be that you are locating an element before you should/can. diff --git a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md index cafe1ec99efb..d570d3b82aa3 100644 --- a/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md +++ b/website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md @@ -98,3 +98,12 @@ WebDriver并不会自动重新定位, 也无法切换回元素有效的活动上下文。 如果这是您的错误原因, 您必须回到正确的位置并重新定位元素。 + +## 无效 SessionId 异常 +有时您尝试访问的会话与当前可用的会话不同。 + +### 可能原因 +通常发生在会话被删除时(例如:`driver.quit()`)或会话发生更改时,例如最后一个标签页/浏览器已关闭(例如:`driver.close()`)。 + +### 可能的解决方案 +检查脚本中是否有 `driver.close()` 和 `driver.quit()` 的实例,以及其他可能导致标签页/浏览器关闭的原因。可能是您在应该/能够定位元素之前就尝试定位了该元素。