public DesktopRequest(int cmdType, int cmdSubType, string[] cmdData, ActionKeyboard keyboard, VisualRecorder recorder, DesktopData[] capabilities, DesktopManager desktop, bool keyDown = false) { CommandType type = (CommandType)cmdType; if (type == CommandType.Driver) { execution = new DriverExecution(cmdSubType, cmdData, capabilities, desktop); } else if (type == CommandType.Mouse) { execution = new MouseExecution(cmdSubType, cmdData, desktop); } else if (type == CommandType.Keyboard) { execution = new KeyboardExecution(cmdSubType, cmdData, keyboard, keyDown); } else if (type == CommandType.Window) { execution = new WindowExecution((WindowType)cmdSubType, cmdData, keyboard, recorder, desktop); } else if (type == CommandType.Record) { execution = new RecordExecution(cmdSubType, cmdData, recorder); } else if (type == CommandType.Element) { execution = new ElementExecution(cmdSubType, cmdData, desktop); } else { execution = new AtsExecution(errorCode, true, errorMessage); } }
public DesktopRequest(int errorCode, bool atsAgent, string message) { execution = new AtsExecution(errorCode, atsAgent, message); }