BotSharp/src/Infrastructure/BotSharp.Abstraction/Browsing/Models/ElementActionArgs.cs

42 lines
871 B
C#
Raw Normal View History

2024-04-08 15:09:08 +00:00
using BotSharp.Abstraction.Browsing.Enums;
2024-03-08 13:19:13 +00:00
namespace BotSharp.Abstraction.Browsing.Models;
public class ElementActionArgs
{
2024-04-30 12:50:01 +00:00
public BroswerActionEnum Action { get; set; }
2024-04-08 15:09:08 +00:00
2024-04-30 12:50:01 +00:00
public string? Content { get; set; }
2024-04-08 15:09:08 +00:00
2024-04-30 12:50:01 +00:00
public ElementPosition? Position { get; set; }
2024-05-17 23:45:18 +00:00
public string? PressKey { get; set; }
public bool? IsFirst { get; set; }
2024-08-01 18:18:34 +00:00
/// <summary>
/// Wait time in seconds
/// </summary>
public int WaitTime { get; set; }
2024-04-30 12:50:01 +00:00
/// <summary>
/// Required for deserialization
/// </summary>
public ElementActionArgs()
{
}
2024-04-16 04:48:22 +00:00
public ElementActionArgs(BroswerActionEnum action, ElementPosition? position = null)
2024-04-08 15:09:08 +00:00
{
2024-04-30 12:50:01 +00:00
Action = action;
Position = position;
2024-04-08 15:09:08 +00:00
}
2024-03-08 13:19:13 +00:00
2024-04-08 15:09:08 +00:00
public ElementActionArgs(BroswerActionEnum action, string content)
2024-03-08 13:19:13 +00:00
{
2024-04-30 12:50:01 +00:00
Action = action;
Content = content;
2024-03-08 13:19:13 +00:00
}
}