browser-use / browser-use

Make websites accessible for AI agents
https://browser-use.com
MIT License
56.55k stars 6.06k forks source link

Custom definition for interactive element #929

Open danielgobona opened 1 month ago

danielgobona commented 1 month ago

Problem Description

Currently, interactive elements are strictly defined inside buildDomTree.sj. I have seen some cases, where element was clickable, but browser-use did not detect it.

Proposed Solution

I can imagine additional config param to Agent like additional interactiveElements, interactiveRoles. Also class that identifies that element is interactive would be nice. Or some custom function that would get element as input and output would be boolean if this element is or is not interactive. This function could be defined in my code and passed to lib (not sure how can be this done properly with Python, i am working mainly with JS/TS).

baiyyee commented 1 month ago

yes, i want this feature too. looks browser-use can't cover all interactive elements current now, there's also many no-standard html elements which not include.