using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Text; namespace SeleniumBrowser { public class CommandInfo { public const string EVENT_SETURL = "seturl"; public const string EVENT_SETURL_INCOGNITO = "seturl_incognito"; public const string EVENT_SENDKEY = "sendkey"; public const string EVENT_PASTE = "paste"; public const string EVENT_SLEEP = "sleep"; public const string EVENT_POSITION_CLICK = "position_click"; public const string EVENT_SETVALUETOUPLOADDLG = "setvaluetouploaddlg"; public const string EVENT_CHECKWINDOWEXIST = "checkwindowexist"; public const string EVENT_IMAGE_CLICK = "image_click"; public const string EVENT_IMAGES_CLICK = "images_click"; public const string EVENT_MOUSE_MOVE = "mouse_move"; public const string EVENT_MOUSE_SCROLL = "mouse_scroll"; public const string EVENT_FB_REMOVE_ALLMEDIA = "fb_remove_allmedia"; private const string _ValuecKey = "_vk0x48"; [JsonIgnore] public string Value { get { return Parameters.ContainsKey(_ValuecKey) ? Parameters[_ValuecKey] : null; } set { if (Parameters.ContainsKey(_ValuecKey)) { Parameters[_ValuecKey] = value; } else { Parameters.Add(_ValuecKey, value); } } } public Dictionary Parameters { get; set; } = new Dictionary(); public int SleepAfterEvent { get; set; } = 1; public string Command { get; set; } public int WaitTargetMilliSecond { get; set; } = 1000; public int TargetNo { get; set; } = 0; public bool SetMainBrowserFocus { get; set; } = false; public int Repeat { get; set; } = 1; } }