Issue Title: Agent fails to interpret HTML when content elements overlap
Issue Description:
I have encountered a persistent issue where the agent is unable to accurately parse and understand the HTML structure of websites that contain overlapping elements.
Observed Behavior:
When the agent encounters specific CSS layouts—such as fixed headers, floating toolbars, or z-index layered components—it fails to correctly identify the DOM nodes or extract the intended data. It appears that the overlapping content confuses the agent’s spatial reasoning or HTML navigation, leading to incomplete or inaccurate rendering of the page structure.
Technical Context:
- Issue: Inability to resolve overlapping DOM elements.
- Result: Data extraction errors and failure to interact with intended elements hidden or obstructed by overlays.
- Environment: The issue occurs consistently on websites that utilize complex layering (e.g., modals, sticky navigation bars, and absolute-positioned UI overlays).
Steps to Reproduce:
- Navigate to a webpage containing significant overlapping content or fixed-position overlays.
- Trigger an agentic action to scrape or interpret the page structure.
- Observe the logs/output to see how the agent interacts with the layered elements.
Expected Behavior:
The agent should be capable of "looking through" visual overlays to identify the underlying HTML structure and prioritize interactive elements correctly, regardless of the CSS stacking context. Please investigate whether the current rendering engine can be optimized to better handle z-index hierarchies.
Issue Title: Agent fails to interpret HTML when content elements overlap
Issue Description:
I have encountered a persistent issue where the agent is unable to accurately parse and understand the HTML structure of websites that contain overlapping elements.
Observed Behavior:
When the agent encounters specific CSS layouts—such as fixed headers, floating toolbars, or z-index layered components—it fails to correctly identify the DOM nodes or extract the intended data. It appears that the overlapping content confuses the agent’s spatial reasoning or HTML navigation, leading to incomplete or inaccurate rendering of the page structure.
Technical Context:
Steps to Reproduce:
Expected Behavior:
The agent should be capable of "looking through" visual overlays to identify the underlying HTML structure and prioritize interactive elements correctly, regardless of the CSS stacking context. Please investigate whether the current rendering engine can be optimized to better handle z-index hierarchies.