test(ui): automation runner gains click at <x> <y> — raw synthetic canvas click
The vitals round's connected verify needed to click ONE specific Character-tab option row, but every toggle row is a template instance sharing the same dat element ids (0x10000218/0x10000219), so `click element` (first-match by dat id) cannot address a row. The drive script now reads the row's rect from its own `dump` line and clicks its center — same synthetic UiRoot press/release route as ClickElement, never the OS cursor (the same no-real-input constraint the morning gate's hover/mousemove verbs follow). Used live: the Side-By-Side Vitals checkbox + Apply choreography that verified db8fa328's swap both directions over a real ACE session. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7fe83e2bb9
commit
51183e431f
2 changed files with 30 additions and 2 deletions
|
|
@ -131,6 +131,22 @@ public sealed class RetailUiAutomationProbe
|
|||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Raw synthetic click at canvas coordinates (vitals retail-modes round,
|
||||
/// 2026-08-17): the Options panel's Character-tab rows are template
|
||||
/// instances sharing ONE dat element id per control
|
||||
/// (<c>0x10000218</c>/<c>0x10000219</c> for every toggle row), so
|
||||
/// element-id addressing cannot reach a SPECIFIC row's checkbox — a
|
||||
/// drive script instead reads the row's rect from <see cref="DumpText"/>
|
||||
/// and clicks its center. Same synthetic <see cref="UiRoot"/> route as
|
||||
/// <see cref="ClickElement"/> — never the OS cursor.
|
||||
/// </summary>
|
||||
public bool ClickAtPoint(int x, int y)
|
||||
{
|
||||
ClickAt(x, y);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 2026-08-17 morning gate: synthetic pointer HOVER (no click) at an
|
||||
/// element's center, for rollover/tooltip verification. Deliberately
|
||||
|
|
|
|||
|
|
@ -219,7 +219,7 @@ public sealed class RetailUiAutomationScriptRunner : IDisposable
|
|||
private bool DoClick(ScriptCommand command)
|
||||
{
|
||||
var p = command.Parts;
|
||||
if (p.Length < 3) return Stop(command, "usage: click element <datId> | click item <guid> [source]");
|
||||
if (p.Length < 3) return Stop(command, "usage: click element <datId> | click item <guid> [source] | click at <x> <y>");
|
||||
string target = p[1].ToLowerInvariant();
|
||||
if (target == "element")
|
||||
{
|
||||
|
|
@ -231,7 +231,19 @@ public sealed class RetailUiAutomationScriptRunner : IDisposable
|
|||
if (!TryParseUInt(p[2], out uint itemGuid)) return Stop(command, $"bad item guid '{p[2]}'");
|
||||
return _probe.ClickItem(itemGuid, ParseSource(p, 3)) || Stop(command, "click item failed");
|
||||
}
|
||||
return Stop(command, "usage: click element <datId> | click item <guid> [source]");
|
||||
if (target == "at")
|
||||
{
|
||||
// `click at <x> <y>` — raw synthetic click in canvas coordinates
|
||||
// (see RetailUiAutomationProbe.ClickAtPoint: template-instanced
|
||||
// controls share one dat id, so a specific row is addressed by
|
||||
// the rect its own `dump` line reports).
|
||||
if (p.Length < 4
|
||||
|| !TryParseInt(p[2], out int x)
|
||||
|| !TryParseInt(p[3], out int y))
|
||||
return Stop(command, "usage: click at <x> <y>");
|
||||
return _probe.ClickAtPoint(x, y) || Stop(command, "click at failed");
|
||||
}
|
||||
return Stop(command, "usage: click element <datId> | click item <guid> [source] | click at <x> <y>");
|
||||
}
|
||||
|
||||
/// <summary>2026-08-17 morning gate: `hover element <datId>` — a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue