agentic_selector method attempts to perform actions on web elements using traditional CSS selectors first. If the selectors don’t produce a unique element, it falls back to using the Operator agent to perform the action intelligently.
This method combines the speed of traditional selectors with the reliability of AI agents. Use it when you want fast, precise element targeting with intelligent fallback for dynamic pages.
Method Signature
Parameters
The action to perform on the element. Supported actions:
CSS selectors to identify the target element. Available selector types:
Natural language instruction for the Operator agent to use if selectors fail to find a unique element.
Maximum time in seconds to wait for the operation to complete. Default is 300 seconds since the Operator agent may need extra time when falling back.
Return Value
Returns anAgenticSelectorResponse object:
- For
get_textandget_propertyactions:response.valuecontains the extracted string. - For all other actions (click, fill, hover, etc.):
response.valueisNone. The method completes when the action has been performed successfully.