Skip to content

fix: Expand browser_type description with exact elements it can interact with #423

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mastrzyz
Copy link

Give AI a hint of what elements it can type into to reduce errors such as below:

 [{"type":"text","text":"Error: locator.fill: Error: Element is not an <input>, <textarea> or [contenteditable] element\nCall log:\n\u001b[2m  - waiting for locator('aria-ref=s23e585')\u001b[22m\n\u001b[2m    - locator resolved to <div role=\"combobox\" spellcheck=\"false\" aria-expanded=\"true\" aria-haspopup=\"listbox\" aria-owns=\"downshift-0-menu\" aria-labelledby=\"people-picker-label\" class=\"ui-box ac fl fk l fu en nu nv am nw nx ny ui-input ac fl fk l fu en nu ui-dropdown__searchinput__wrapper ui-dropdown__searchinput\">…</div>\u001b[22m\n\u001b[2m    - fill(\"[email protected]\")\u001b[22m\n\u001b[2m  - attempting fill action\u001b[22m\n\u001b[2m    - waiting for element to be visible, enabled and editable\u001b[22m\n"}]

@pavelfeldman
Copy link
Member

That's a good error, is it not recovering from it?

@mastrzyz
Copy link
Author

That's a good error, is it not recovering from it?

yes if we sent it back to AI but this is 2 AI Requests vs potentially one if AI was better informed?

@pavelfeldman
Copy link
Member

Using more tokens for the tool description degrades overall performance for all tasks. So if this is a recoverable edge case, returning error is more efficient.

@mastrzyz
Copy link
Author

Using more tokens for the tool description degrades overall performance for all tasks. So if this is a recoverable edge case, returning error is more efficient.

true, we need data on how often this occurs and how much retrying costs in tokens vs what the token cost of adding this is.

It probably also depends on the subject under test, our clients AOM is huge so probably gets confused more frequently..

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

Successfully merging this pull request may close these issues.

2 participants