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

Open
wants to merge 11 commits into
base: trunk
Choose a base branch
from

Conversation

shbenzer
Copy link
Contributor

@shbenzer shbenzer commented Sep 24, 2024

User description

Added ElementNotInteractableException to Common Errors docs

Description

updated index.md in all translations with ElementNotInteractableException docoumenation

Motivation and Context

make docs more comprehensive

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Documentation


Description

  • Added documentation for ElementNotInteractableException across multiple languages (English, Japanese, Portuguese, Chinese).
  • Described the likely causes of the exception, such as elements not being displayed or interactable.
  • Provided possible solutions, including using explicit waits or interacting with other elements.

Changes walkthrough 📝

Relevant files
Documentation
_index.en.md
Add documentation for ElementNotInteractableException in English

website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md

  • Added a new section for ElementNotInteractableException.
  • Described likely causes and possible solutions.
  • +17/-0   
    _index.ja.md
    Add documentation for ElementNotInteractableException in Japanese

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md

  • Added a new section for ElementNotInteractableException.
  • Described likely causes and possible solutions.
  • +17/-0   
    _index.pt-br.md
    Add documentation for ElementNotInteractableException in Portuguese

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md

  • Added a new section for ElementNotInteractableException.
  • Described likely causes and possible solutions.
  • +17/-0   
    _index.zh-cn.md
    Add documentation for ElementNotInteractableException in Chinese

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md

  • Added a new section for ElementNotInteractableException.
  • Described likely causes and possible solutions.
  • +17/-0   

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link

    netlify bot commented Sep 24, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit 131f547

    @qodo-merge-pro qodo-merge-pro bot added documentation Improvements or additions to documentation Review effort [1-5]: 2 labels Sep 24, 2024
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Untranslated Content
    The new section for ElementNotInteractableException is not translated to Japanese.

    Untranslated Content
    The new section for ElementNotInteractableException is not translated to Portuguese.

    Untranslated Content
    The new section for ElementNotInteractableException is not translated to Chinese.

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Localization
    Translate the new ElementNotInteractableException section to Japanese

    Translate the newly added content to Japanese to maintain consistency with the rest
    of the file, which appears to be in Japanese.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.ja.md [145-160]

     ## ElementNotInteractableException
     
    -This occurs when Selenium is unable to interact with a WebElement.
    +これは、Seleniumが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
    +通常、以下の3つのうちの1つが発生した場合に起こります:
    +* 要素が表示されていない
    +* 要素がポインターやキーボードで操作できない
    +* 要素の中心点をビューポートにスクロールできない
     
    -### 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.
    +状況によっては、何もできない場合もあります。ただし、試すことができる方法として、
    +[明示的な待機]({{< ref "../waits#explicit-waits" >}})を設定したり、
    +ページ上の別の要素やボタンと対話してDOMの状態を変更したりすることが考えられます。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Translating the content maintains consistency with the rest of the document, which is crucial for accessibility and comprehension for Japanese-speaking users.

    9
    Translate the new ElementNotInteractableException section to Portuguese (Brazilian)

    Translate the newly added content to Portuguese (Brazilian) to maintain consistency
    with the rest of the file, which appears to be in Portuguese.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.pt-br.md [145-160]

     ## ElementNotInteractableException
     
    -This occurs when Selenium is unable to interact with a WebElement.
    +Isso ocorre quando o Selenium não consegue interagir com um WebElement.
     
    -### Likely Cause
    +### Causa Provável
     
    -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
    +Isso geralmente ocorre quando uma das três coisas acontece:
    +* Um elemento não está sendo exibido
    +* Um elemento não é interativo nem por ponteiro nem por teclado
    +* O ponto central de um elemento não pode ser rolado para a viewport
     
    -### Possible Solutions
    +### Possíveis Soluções
     
    -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.
    +Dependendo da circunstância, pode _não_ haver nada que você possa fazer. No entanto, 
    +possíveis coisas para tentar são configurar [Esperas Explícitas]({{< ref "../waits#explicit-waits" >}}) 
    +ou interagir com outro elemento/clicar em um botão na página que possa alterar o estado do DOM.
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Ensuring the new content is in Portuguese maintains the document's consistency and accessibility for Portuguese-speaking users, which is important for effective communication.

    9
    Translate the new ElementNotInteractableException section to Chinese (Simplified)

    Translate the newly added content to Chinese (Simplified) to maintain consistency
    with the rest of the file, which appears to be in Chinese.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.zh-cn.md [149-164]

     ## ElementNotInteractableException
     
    -This occurs when Selenium is unable to interact with a WebElement.
    +当Selenium无法与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.
    +根据具体情况,可能_没有_什么可以做的。然而,可以尝试的方法包括设置
    +[显式等待]({{< ref "../waits#explicit-waits" >}})或与页面上的另一个元素/按钮
    +进行交互,这可能会改变DOM的状态。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Translating the content into Chinese ensures consistency and accessibility for Chinese-speaking users, which is essential for understanding and usability.

    9
    Enhancement
    Add a code example for using Explicit Waits to handle ElementNotInteractableException

    Consider adding an example code snippet demonstrating how to use Explicit Waits to
    handle ElementNotInteractableException. This would provide users with a practical
    implementation of the suggested solution.

    website_and_docs/content/documentation/webdriver/troubleshooting/errors/_index.en.md [162-164]

     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.
     
    +Here's an example of using Explicit Waits:
    +
    +```python
    +from selenium.webdriver.support.ui import WebDriverWait
    +from selenium.webdriver.support import expected_conditions as EC
    +from selenium.webdriver.common.by import By
    +
    +element = WebDriverWait(driver, 10).until(
    +    EC.element_to_be_clickable((By.ID, "myElement"))
    +)
    +element.click()
    +```
    +
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding a practical code example enhances the documentation by providing users with a clear implementation of the suggested solution, improving usability and understanding.

    7

    💡 Need additional feedback ? start a PR chat

    @shbenzer
    Copy link
    Contributor Author

    issue #1276

    @shbenzer
    Copy link
    Contributor Author

    @harsha509 what do you think?

    Copy link

    @A1exKH A1exKH left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    @shbenzer PR LGTM.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    documentation Improvements or additions to documentation Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants