browser-use icon indicating copy to clipboard operation
browser-use copied to clipboard

Custom definition for interactive element

Open danielgobona opened this issue 1 year ago • 2 comments

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).

danielgobona avatar Mar 03 '25 14:03 danielgobona

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.

baiyyee avatar Mar 05 '25 01:03 baiyyee

The interactive element detection has been significantly improved since this was filed. Do you have a specific site/element that the current detection misses? I'm happy to take a look at it.

You could also tweak the existing clickable element detector to layer your own checks on top.

laithrw avatar Mar 26 '26 15:03 laithrw