AI Integration
This server is AI-agnostic. Use it with LLMs and agent frameworks.
Loop Pattern
- Start session → get context
- LLM decides action based on
context.interactiveElements - POST action → receive
message,result, newcontext - Repeat until done; terminate session
Tips
- Use
labelortextto reason about elements - Always act via
elementId - Handle
ELEMENT_NOT_FOUND/STALE_ELEMENT_REFERENCEby re-fetching context, then retry - Prefer
waitForDisplayed/waitForExistbefore actions
Python Pseudocode
context = start_session(...)
while not done:
action = llm_decide(context)
resp = act(session_id, action)
context = resp['context']