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

TypeError in is_auto_completion_input Method Due to NoneType Class Attribute #1250

Open
Yasser-shrief opened this issue Nov 24, 2024 · 1 comment

Comments

@Yasser-shrief
Copy link

I am encountering a TypeError in the is_auto_completion_input method within the SkyvernElement class. This error occurs when the method attempts to check for a substring in a NoneType object, specifically when the class attribute of a DOM element is None.
URL:
The issue occurs during the execution of tasks on the URL: https://onkayit.gelisim.edu.tr/On_Kayit_Yabanci_Uyruk.aspx
Field Causing Failure:
The failure is related to the passport number input field, identified by the element ID 54Ej.
Log Error:
`skyvern-1 | TypeError: argument of type 'NoneType' is not iterable

skyvern-1 | Traceback (most recent call last):

skyvern-1 | File "/app/skyvern/webeye/actions/handler.py", line 252, in handle_action

skyvern-1 | results = await handler(action, page, scraped_page, task, step)

skyvern-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

skyvern-1 | File "/app/skyvern/webeye/actions/handler.py", line 570, in handle_input_text_action

skyvern-1 | if await skyvern_element.is_auto_completion_input() or input_or_select_context.is_location_input:

skyvern-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

skyvern-1 | File "/app/skyvern/webeye/utils/dom.py", line 147, in is_auto_completion_input

skyvern-1 | if "autocomplete-input" in class_name:

skyvern-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

skyvern-1 | TypeError: argument of type 'NoneType' is not iterable
`

I need assistance in understanding why the class attribute is None for this element and how to handle such cases effectively.
Any insights or suggestions on how to modify the is_auto_completion_input method to prevent this error would be greatly appreciated.

Thank you for your assistance!

@LawyZheng
Copy link
Collaborator

looks like your code is not the latest one.

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

2 participants