using BotSharp.Abstraction.Browsing.Enums; using System.Diagnostics; namespace BotSharp.Abstraction.Browsing.Models; [DebuggerStepThrough] public class PageActionArgs { public BroswerActionEnum Action { get; set; } public string? Content { get; set; } public string Direction { get; set; } = "down"; public string Url { get; set; } = null!; /// /// This value has to be set to true if you want to get the page XHR/ Fetch responses /// [JsonPropertyName("open_new_tab")] public bool OpenNewTab { get; set; } = true; [JsonPropertyName("open_blank_page")] public bool OpenBlankPage { get; set; } = true; [JsonPropertyName("enable_response_callback")] public bool EnableResponseCallback { get; set; } = false; /// /// Exclude urls for XHR/ Fetch responses /// public string[]? ExcludeResponseUrls { get; set; } /// /// Only include urls for XHR/ Fetch responses /// public string[]? IncludeResponseUrls { get; set; } public List? Selectors { get; set; } /// /// If set to true, the response will be stored in memory /// public bool ResponseInMemory { get; set; } = false; public List? ResponseContainer { get; set; } public bool WaitForNetworkIdle { get; set; } = true; public float? Timeout { get; set; } /// /// Wait time in seconds after page is opened /// public int WaitTime { get; set; } public bool ReadInnerHTMLAsBody { get; set; } = false; [JsonPropertyName("keep_browser_open")] public bool KeepBrowserOpen { get; set; } = false; }