Skip to content

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

Draft
thibaultdory wants to merge 3 commits intomainfrom
fix/browser-agent-cookie-banner
Draft

Fix browser agent handling of cookie banners and modal dialogs#1
thibaultdory wants to merge 3 commits intomainfrom
fix/browser-agent-cookie-banner

Conversation

@thibaultdory
Copy link
Copy Markdown
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