Files
recordingtest/src/Recordingtest.Recorder/Scenario.cs

43 lines
1.5 KiB
C#

using System.Collections.Generic;
namespace Recordingtest.Recorder;
public sealed class Scenario
{
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public ScenarioSut Sut { get; set; } = new();
public List<ScenarioStep> Steps { get; set; } = new();
}
public sealed class ScenarioSut
{
public string Exe { get; set; } = "EG-BIM Modeler/EG-BIM Modeler.exe";
public int StartupTimeoutMs { get; set; } = 15000;
}
public sealed class ScenarioStep
{
/// <summary>click | type | drag | hotkey | wait | focus</summary>
public string Kind { get; set; } = "click";
public ScenarioTarget? Target { get; set; }
public string? Value { get; set; }
public string? WaitFor { get; set; }
/// <summary>ms since recording start (or epoch ms from RawEvent).</summary>
public long Ts { get; set; }
/// <summary>Raw screen coordinate [x, y] when applicable.</summary>
public int[]? RawCoord { get; set; }
/// <summary>For drag steps: end offset within target element.</summary>
public double[]? EndOffset { get; set; }
/// <summary>For drag steps: end raw coordinate [x, y].</summary>
public int[]? EndRawCoord { get; set; }
/// <summary>Raw Win32 virtual-key code for diagnostics (issue #11).</summary>
public uint? RawVk { get; set; }
}
public sealed class ScenarioTarget
{
public string UiaPath { get; set; } = string.Empty;
public double[] Offset { get; set; } = new double[] { 0.5, 0.5 };
}