-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebCommand.cs
More file actions
69 lines (54 loc) · 1.5 KB
/
Copy pathWebCommand.cs
File metadata and controls
69 lines (54 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
abstract class WebCommand : Command
{
public WebCommand()
{
Interactive = false;
SearchProvider = WebSearchProvider.Google;
MaxResults = 10;
ExcludeURLContainsPatternList = new();
Browser = BrowserType.Chromium;
GetContent = false;
StripHtml = false;
SaveFolder = null;
PageInstructionsList = new();
InputActions = new();
}
public bool Interactive { get; set; }
public WebSearchProvider SearchProvider { get; set; }
public List<Regex> ExcludeURLContainsPatternList { get; set; }
public int MaxResults { get; set; }
public BrowserType Browser { get; set; }
public bool GetContent { get; set; }
public bool StripHtml { get; set; }
public string SaveFolder { get; set; }
public List<Tuple<string, string>> PageInstructionsList;
public List<WebInputAction> InputActions;
public string SavePageOutput { get; set; }
}
public class WebInputAction
{
public WebInputActionType Type { get; set; }
public string Selector { get; set; }
public string Value { get; set; }
public int? X { get; set; }
public int? Y { get; set; }
public string TargetSelector { get; set; }
public WebInputAction(WebInputActionType type)
{
Type = type;
}
}
public enum WebInputActionType
{
Click,
MouseMove,
DragDrop,
Scroll,
KeyPress,
TypeText,
Shortcut
}
}