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

Form Filling Automation - Element Not Interactable #600

Open
rogaha opened this issue Sep 5, 2024 · 2 comments
Open

Form Filling Automation - Element Not Interactable #600

rogaha opened this issue Sep 5, 2024 · 2 comments

Comments

@rogaha
Copy link

rogaha commented Sep 5, 2024

Description:

An error occurs when attempting to fill fields in a Google Docs form titled "FORMULÁRIO DE SISTEMA DE COMPENSAÇÃO PARA UNIDADES CONSUMIDORAS". The automation process fails to interact with certain input fields, generating a "Message: element not interactable" error.

Steps to Reproduce:

Navigate to the Google Docs form titled "FORMULÁRIO DE SISTEMA DE COMPENSAÇÃO PARA UNIDADES CONSUMIDORAS".
Attempt to fill in the following fields:
Unidade Consumidora: '2476760'
Nome do Titular: 'ANTONIO CARLOS RUBINI'
CPF/CNPJ: '94246424820'
Endereço: 'Avenida Roseira, 1543 - Prq. Residencial dos Girassois, CAMPO GRANDE, 79091848'
The system attempts to interact with the input field but fails with the error message.
Expected Behavior:

The form fields should be filled with the provided data without errors.

Actual Behavior:

The system throws an error: "Message: element not interactable" when trying to click on /html/body/div[2]/div[3]/div[2]/div/div[2]/div/div/div/input.

Error Logs:

Timestamp: 2024-09-05 14:41:52,442
Error Message: Message: element not interactable (Session info: chrome=128.0.6613.115)
Stack Trace:
swift
Copy code
0   chromedriver                        0x000000010456f998 cxxbridge1$str$ptr + 1887096
1   chromedriver                        0x0000000104567e00 cxxbridge1$str$ptr + 1855456
2   chromedriver                        0x000000010416ca48 cxxbridge1$string$len + 89100
3   chromedriver                        0x00000001041b1f3c cxxbridge1$string$len + 372992
4   chromedriver                        0x00000001041a7930 cxxbridge1$string$len + 330484
5   chromedriver                        0x00000001041a73c0 cxxbridge1$string$len + 329092
6   chromedriver                        0x00000001041ea4a4 cxxbridge1$string$len + 603752

Possible Cause:

The targeted input element might not be visible or enabled at the time of interaction, resulting in an "element not interactable" error.
Timing or rendering issues within the form interface may be preventing the automation tool from interacting with the field.
Suggested Fix:

Implement a check to ensure the element is fully rendered and visible before interacting with it.
Introduce waits or retries to handle timing issues, such as WebDriverWait to wait until the element is interactable.
Review the form's HTML structure to ensure the XPath /html/body/div[2]/div[3]/div[2]/div/div[2]/div/div/div/input is targeting the correct input element.

Environment:

Browser: Chrome 128.0.6613.115
Automation Tool: ChromeDriver
OS: macOS (or relevant operating system)

@dhuynh95
Copy link
Collaborator

@adeprez can you have a look?

@adeprez
Copy link
Contributor

adeprez commented Sep 13, 2024

Hello @rogaha, could you share with us the Google Docs Form the agent is trying to interact with?

I guess the element was made uninteractive before the agent could perform the actual action. It could be due to a human interaction on the page, or an unexpected DOM change that made the element non accessible.

Implement a check to ensure the element is fully rendered and visible before interacting with it.

Actually we have this check: agent will only propose actions for elements he can interact with (i.e. rendered, visible, non disabled, non overlayed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants