Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ElementNotInteractableException to Common Errors #1972

Closed
Closed
Show file tree
Hide file tree
Changes from 13 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 @@ -145,3 +145,20 @@ like when the last tab/browser has closed (e.g. `driver.close()`)

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.

## ElementNotInteractableException

This occurs when Selenium is unable to interact with a WebElement.

### Likely Cause

This usually occurs when one of three things happens:
* An element is not displayed
* An element is neither pointer nor keyboard interactable
* An element's center point can not be scrolled into the viewport

### Possible Solutions

Depending on the circumstance, there might _not_ be anything you can do. However, possible
things to try are setting [Explicit Waits]({{< ref "../waits#explicit-waits" >}}) or interacting
with another element/clicking a button on the page that might change state of the DOM.
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,20 @@ like when the last tab/browser has closed (e.g. `driver.close()`)

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.

## ElementNotInteractableException

This occurs when Selenium is unable to interact with a WebElement.

### Likely Cause

This usually occurs when one of three things happens:
* An element is not displayed
* An element is neither pointer nor keyboard interactable
* An element's center point can not be scrolled into the viewport

### Possible Solutions

Depending on the circumstance, there might _not_ be anything you can do. However, possible
things to try are setting [Explicit Waits]({{< ref "../waits#explicit-waits" >}}) or interacting
with another element/clicking a button on the page that might change state of the DOM.
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,20 @@ This usually occurs when the session has been deleted (e.g. `driver.quit()`) or
### 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.

## ElementNotInteractableException

This occurs when Selenium is unable to interact with a WebElement.

### Likely Cause

This usually occurs when one of three things happens:
* An element is not displayed
* An element is neither pointer nor keyboard interactable
* An element's center point can not be scrolled into the viewport

### Possible Solutions

Depending on the circumstance, there might _not_ be anything you can do. However, possible
things to try are setting [Explicit Waits]({{< ref "../waits#explicit-waits" >}}) or interacting
with another element/clicking a button on the page that might change state of the DOM.
Original file line number Diff line number Diff line change
Expand Up @@ -145,3 +145,20 @@ Actions class with `Actions.moveToElement(element)`.

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

## ElementNotInteractableException

This occurs when Selenium is unable to interact with a WebElement.

### Likely Cause

This usually occurs when one of three things happens:
* An element is not displayed
* An element is neither pointer nor keyboard interactable
* An element's center point can not be scrolled into the viewport

### Possible Solutions

Depending on the circumstance, there might _not_ be anything you can do. However, possible
things to try are setting [Explicit Waits]({{< ref "../waits#explicit-waits" >}}) or interacting
with another element/clicking a button on the page that might change state of the DOM.