Implement player PoC (#7)

This commit is contained in:
minsung
2026-04-07 14:28:11 +09:00
parent d486cbb4d9
commit f17e764678
12 changed files with 727 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
using Recordingtest.Player.Model;
namespace Recordingtest.Player;
/// <summary>Element bounds in screen pixels.</summary>
public readonly record struct ElementBounds(double X, double Y, double Width, double Height);
/// <summary>Resolved element handle (opaque to the engine).</summary>
public readonly record struct ResolvedElement(ElementBounds Bounds, object? Native);
public readonly record struct ScreenPoint(int X, int Y);
public interface IPlayerHost
{
/// <summary>Resolve a UIA path with retry/timeout. Returns null if not found.</summary>
ResolvedElement? ResolveElement(string uiaPath, TimeSpan timeout);
/// <summary>Wait for a wait_for hint to be satisfied. Returns false on timeout.</summary>
bool WaitFor(string waitForHint, TimeSpan timeout);
void Click(ScreenPoint point);
void Type(string text);
void Drag(ScreenPoint from, ScreenPoint to);
void Hotkey(string keys);
void CaptureCheckpoint(int afterStep, string saveAs);
void CaptureFailureArtifacts(int stepIndex, string reason);
}