write_form_fields_by_label
Fills multiple 1C form fields by matching their on-screen labels, types values Unicode-safe, and verifies each commit via readback.
Instructions
Write values into form fields located by their on-screen LABEL — CONFIG-AGNOSTIC, no per-field capture
(generalizes write_form_value_xtest beyond a single fixed field). Foregrounds the form by open_link (e.g.
e1cib/data/Справочник.Валюты create form), then TWO-PASS: pass 1 locate_text's every label and records its
right edge; pass 2 clicks each field into the SHARED input column (rightmost label edge + input_column_gap) —
so a short reference label like «Владелец» hits the same right-aligned column as the longest label instead of
under-reaching into a neighbour — types the value Unicode-safe (xtest_type_unicode — Cyrillic-safe) -> Tab.
(A field_mode="date" field clicks its own input mask at date_input_offset and types digit keys, never the
calendar button; with 0/1 located labels the column falls back to the legacy label-center + input_offset.)
Pairs with autofill_required_fields (feed its resolved {label->value} plan). save -> Ctrl+S (creates a
record).
HONEST verification: after typing, the open form is value-READ on a fresh manager connection (readback,
default on) and each item's committed is set True ONLY when the requested value is actually read back from
the form model (the «стал равен» value-read) — a field targeted on screen but not read back is
committed=False (no false positives). OData cannot verify here: a test-client-held file/server base is
exclusively locked, so the protocol value-read of the SAME client is the verification, not assert_data.
PREREQ: client launched with an Xvfb display + matchbox. all_targeted = every label located + typed;
all_committed = every targeted value read back. Returns {open_link, foregrounded, results:[{label, value,
click_xy, targeted, committed, readback_value, geometry}], all_targeted, all_committed, readback:{opened,
field_count, verified, fields}, screenshot}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | 127.0.0.1 | |
| port | No | ||
| save | No | ||
| labels | Yes | ||
| values | Yes | ||
| display | Yes | ||
| readback | No | ||
| open_link | Yes | ||
| settle_sec | No | ||
| field_modes | No | ||
| input_offset | No | ||
| input_column_gap | No | ||
| readback_caption | No | ||
| date_input_offset | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||