tc_find
Search the UI tree for objects in 1C:Enterprise test client by name, class, type, or title. Find one or multiple, or wait for display, with timeout and pagination support.
Instructions
Search the UI tree for objects.
marks a required action parameter; the group schema treats action parameters as optional. Pass action="name" and only that action's parameters. Actions:
find_object(name=null, cls=null, type=null, root_ref=null, title=null, timeout=0, scope='window') Find the first object matching the criteria (parameters as in tc_find(action="find_objects")). When nothing matched, the answer carries the same filter diagnostics as tc_find(action="find_objects"). (1C 8.3.3+)
find_objects(name=null, cls=null, type=null, root_ref=null, title=null, timeout=0, scope='window', limit=null, cursor=null) Search UI objects: name/title support * ?; cls/type use discovered class/platform kind (tc_app(action="get_child_objects")). root_ref defaults to active window; scope=application requires omitting it. timeout retries while no matches (0: once). Empty results are ok; cls/type diagnostics identify unknown filters and list observed kinds. Windows/command buttons include url when available. No limit returns all; limit=1..1000 pages with total/has_more/next_cursor. Continue with cursor alone (plus connection_id if needed), no filters. Pages retain the original result for 5 minutes; elements may become stale. (1C 8.3.3+)
wait_for_object_displayed(name=null, cls=null, type=null, title=null, timeout=60) Poll the UI tree until an object matching the criteria appears, up to timeout seconds. Returns the object, or ok=False on timeout. Criteria as in tc_find(action="find_objects"). On timeout the answer says whether a
clswas seen at all and lists the classes that were actually present, so a misspelled class name is distinguishable from an object that never appeared. (1C 8.3.3+) root_ref selects the client; otherwise set connection_id when several clients are connected. Use tc_session(action="list_connections"). Success may omit target/connection echoes and shorten window details. Use returned references unchanged in root_ref; re-find expired elements.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cls | No | ||
| name | No | ||
| type | No | ||
| limit | No | ||
| scope | No | ||
| title | No | ||
| action | Yes | ||
| cursor | No | ||
| timeout | No | ||
| root_ref | No | ||
| connection_id | No |