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

Fix browser agent handling of cookie banners and modal dialogs #1

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

Conversation

thibaultdory
Copy link
Owner

Problem

The browser agent gets stuck when encountering cookie banners (like on google.com) because it does not properly handle modal dialogs and hidden elements.

Solution

  • Added detection of modal dialogs in accessibility tree
  • Updated prompts to prioritize handling cookie banners
  • Disabled visible-only filtering to handle hidden cookie banner elements
  • Added example of handling cookie banner in prompt

Testing

Added unit tests to verify:

  • Modal dialog detection function
  • Proper guidance in system message and prompts
  • Example handling of cookie banners

Notes

  • The agent will now prioritize handling cookie banners before attempting other actions
  • Hidden elements (like cookie banner buttons) will now be visible to the agent
  • Added clear examples to help the agent understand how to handle cookie banners

- Add detection of modal dialogs in accessibility tree
- Update prompts to prioritize handling cookie banners
- Disable visible-only filtering to handle hidden cookie banner elements
- Add example of handling cookie banner in prompt
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