Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,12 @@ WebDriver并不会自动重新定位,
也无法切换回元素有效的活动上下文。
如果这是您的错误原因,
您必须回到正确的位置并重新定位元素。

## 无效 SessionId 异常
有时您尝试访问的会话与当前可用的会话不同。

### 可能原因
通常发生在会话被删除时(例如:`driver.quit()`)或会话发生更改时,例如最后一个标签页/浏览器已关闭(例如:`driver.close()`)。

### 可能的解决方案
检查脚本中是否有 `driver.close()` 和 `driver.quit()` 的实例,以及其他可能导致标签页/浏览器关闭的原因。可能是您在应该/能够定位元素之前就尝试定位了该元素。