Esempio n. 1
0
        protected override void InternalExecute(ICommandAdapter adapter)
        {
            if (Parameters.MainParameter == null)
            {
                Parameters.MainParameter = new MainParameter();
            }
            var activateApplicationWindowCommand = new ActivateWindowCommand();

            activateApplicationWindowCommand.SynchWith(this);
            activateApplicationWindowCommand.Execute(adapter);


            var simulator = new Automation.InputSimulator.InputSimulator();

            if (!string.IsNullOrEmpty(Parameters.MainParameter.Value))
            {
                simulator.Keyboard.TextEntry(Parameters.MainParameter.Value);
            }
            var field = this.ParameterValue("Field", "");

            if (!string.IsNullOrEmpty(field))
            {
                var fillFieldCommand = new FillFieldCommand();
                fillFieldCommand.Parameters.Add(new Parameter(field, "", true, EndPosition));
                fillFieldCommand.Execute(adapter);
            }

            Execute(simulator);
        }
Esempio n. 2
0
 internal void SetFieldValue(string fieldName, string value)
 {
     FillFieldCommand.SetFieldCommand(adapter, fieldName, value);
 }