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

56 lines
1.6 KiB
C#
Raw Normal View History

2024-06-10 15:51:14 +00:00
using BotSharp.Abstraction.Browsing.Enums;
2024-10-28 02:07:30 +00:00
using System.Diagnostics;
2024-06-10 15:51:14 +00:00
namespace BotSharp.Abstraction.Browsing.Models;
2024-10-28 02:07:30 +00:00
[DebuggerStepThrough]
2024-06-10 15:51:14 +00:00
public class PageActionArgs
{
public BroswerActionEnum Action { get; set; }
public string? Content { get; set; }
2024-10-18 19:21:11 +00:00
public string Direction { get; set; } = "down";
2024-06-10 15:51:14 +00:00
public string Url { get; set; } = null!;
2024-08-05 00:15:27 +00:00
/// <summary>
/// This value has to be set to true if you want to get the page XHR/ Fetch responses
/// </summary>
2025-03-14 19:43:23 +00:00
[JsonPropertyName("open_new_tab")]
public bool OpenNewTab { get; set; } = true;
[JsonPropertyName("open_blank_page")]
public bool OpenBlankPage { get; set; } = true;
2024-08-12 14:43:39 +00:00
public bool EnableResponseCallback { get; set; } = false;
/// <summary>
/// Exclude urls for XHR/ Fetch responses
/// </summary>
public string[]? ExcludeResponseUrls { get; set; }
2024-08-12 14:43:39 +00:00
/// <summary>
/// Only include urls for XHR/ Fetch responses
/// </summary>
public string[]? IncludeResponseUrls { get; set; }
2024-11-03 16:41:01 +00:00
public List<string>? Selectors { get; set; }
2024-08-14 03:44:53 +00:00
/// <summary>
/// If set to true, the response will be stored in memory
/// </summary>
public bool ResponseInMemory { get; set; } = false;
public List<WebPageResponseData>? ResponseContainer { get; set; }
2024-07-27 03:38:28 +00:00
public bool WaitForNetworkIdle { get; set; } = true;
2024-06-26 12:48:15 +00:00
public float? Timeout { get; set; }
2024-08-04 22:48:52 +00:00
/// <summary>
/// Wait time in seconds after page is opened
/// </summary>
public int WaitTime { get; set; }
2024-10-08 01:20:48 +00:00
public bool ReadInnerHTMLAsBody { get; set; } = false;
2025-03-14 19:43:23 +00:00
[JsonPropertyName("keep_browser_open")]
public bool KeepBrowserOpen { get; set; } = false;
2024-06-10 15:51:14 +00:00
}