From a606b4930895c11c91de2fc593821ddf15f89653 Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Tue, 17 Mar 2020 15:47:08 -0400 Subject: [PATCH 01/33] Bug fixes for dictionary commands. Started Powershell command --- .../Commands/GetDictionaryValueCommand.cs | 7 ++ .../Commands/LoadDictionaryCommand.cs | 11 ++- .../Commands/RunPowerShellScriptCommand.cs | 83 +++++++++++++++++++ .../Core/Automation/Commands/ScriptCommand.cs | 1 + taskt/UI/CustomControls/CustomControls.cs | 1 + taskt/packages.config | 1 + taskt/taskt.csproj | 4 + 7 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 taskt/Core/Automation/Commands/RunPowerShellScriptCommand.cs diff --git a/taskt/Core/Automation/Commands/GetDictionaryValueCommand.cs b/taskt/Core/Automation/Commands/GetDictionaryValueCommand.cs index fc111e6e2..3e764f0c9 100644 --- a/taskt/Core/Automation/Commands/GetDictionaryValueCommand.cs +++ b/taskt/Core/Automation/Commands/GetDictionaryValueCommand.cs @@ -62,6 +62,13 @@ public override void RunCommand(object sender) VariableName = v_OutputVariable, VariableValue = dict[v_Key] }; + + //Overwrites variable if it already exists + if (engine.VariableList.Exists(x => x.VariableName == Output.VariableName)) + { + Script.ScriptVariable temp = engine.VariableList.Where(x => x.VariableName == Output.VariableName).FirstOrDefault(); + engine.VariableList.Remove(temp); + } //Add to variable list engine.VariableList.Add(Output); } diff --git a/taskt/Core/Automation/Commands/LoadDictionaryCommand.cs b/taskt/Core/Automation/Commands/LoadDictionaryCommand.cs index 214a411dc..6279775ad 100644 --- a/taskt/Core/Automation/Commands/LoadDictionaryCommand.cs +++ b/taskt/Core/Automation/Commands/LoadDictionaryCommand.cs @@ -67,6 +67,7 @@ public override void RunCommand(object sender) var engine = (Core.Automation.Engine.AutomationEngineInstance)sender; var vInstance = DateTime.Now.ToString(); var vFilePath = v_FilePath.ConvertToUserVariable(sender); + var vDictionaryName = v_DictionaryName.ConvertToUserVariable(sender); var newExcelSession = new Microsoft.Office.Interop.Excel.Application { @@ -81,7 +82,7 @@ public override void RunCommand(object sender) //Query required from workbook using OLEDB DatasetCommands dataSetCommand = new DatasetCommands(); - DataTable requiredData = dataSetCommand.CreateDataTable(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + v_FilePath + @";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""", "Select " + v_KeyColumn + "," + v_ValueColumn + " From [" + v_SheetName + "$]"); + DataTable requiredData = dataSetCommand.CreateDataTable(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + vFilePath + @";Extended Properties=""Excel 12.0;HDR=YES;IMEX=1""", "Select " + v_KeyColumn + "," + v_ValueColumn + " From [" + v_SheetName + "$]"); var dictlist = requiredData.AsEnumerable().Select(x => new { @@ -97,7 +98,7 @@ public override void RunCommand(object sender) Script.ScriptVariable newDictionary = new Script.ScriptVariable { - VariableName = v_DictionaryName, + VariableName = vDictionaryName, VariableValue = outputDictionary }; //close excel @@ -106,6 +107,12 @@ public override void RunCommand(object sender) //remove instance engine.RemoveAppInstance(vInstance); + //Overwrites variable if it already exists + if (engine.VariableList.Exists(x => x.VariableName == newDictionary.VariableName)) + { + Script.ScriptVariable tempDictionary = engine.VariableList.Where(x => x.VariableName == newDictionary.VariableName).FirstOrDefault(); + engine.VariableList.Remove(tempDictionary); + } engine.VariableList.Add(newDictionary); } public override List Render(frmCommandEditor editor) diff --git a/taskt/Core/Automation/Commands/RunPowerShellScriptCommand.cs b/taskt/Core/Automation/Commands/RunPowerShellScriptCommand.cs new file mode 100644 index 000000000..edc1fa874 --- /dev/null +++ b/taskt/Core/Automation/Commands/RunPowerShellScriptCommand.cs @@ -0,0 +1,83 @@ +using System; +using System.Collections.Generic; +using System.Management.Automation; +using System.Management.Automation.Runspaces; +using System.Windows.Forms; +using System.Xml.Serialization; +using taskt.UI.CustomControls; +using taskt.UI.Forms; + +namespace taskt.Core.Automation.Commands +{ + [Serializable] + [Attributes.ClassAttributes.Group("Programs/Process Commands")] + [Attributes.ClassAttributes.Description("This command allows you to run a script or program and wait for it to exit before proceeding.")] + [Attributes.ClassAttributes.UsesDescription("Use this command when you want to run a script (such as vbScript, javascript, or executable) but wait for it to close before taskt continues executing.")] + [Attributes.ClassAttributes.ImplementationDescription("This command implements 'Process.Start' and waits for the script/program to exit before proceeding.")] + public class RunPowerShellScriptCommand : ScriptCommand + { + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Enter the path to the PowerShell script")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFileSelectionHelper)] + [Attributes.PropertyAttributes.InputSpecification("Enter a fully qualified path to the script, including the script extension.")] + [Attributes.PropertyAttributes.SampleUsage("**C:\\temp\\myscript.ps1**")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_ScriptPath { get; set; } + + public RunPowerShellScriptCommand() + { + this.CommandName = "RunPowerShellScriptCommand"; + this.SelectionName = "Run PowerShell Script"; + this.CommandEnabled = true; + this.CustomRendering = true; + } + + public override void RunCommand(object sender) + { + { + var scriptPath = v_ScriptPath.ConvertToUserVariable(sender); + + RunScript(scriptPath); + + } + } + + public static ICollection RunScript(string scriptFullPath, ICollection parameters = null) + { + var runspace = RunspaceFactory.CreateRunspace(); + runspace.Open(); + var pipeline = runspace.CreatePipeline(); + var cmd = new Command(scriptFullPath); + if (parameters != null) + { + foreach (var p in parameters) + { + cmd.Parameters.Add(p); + } + } + pipeline.Commands.Add(cmd); + var results = pipeline.Invoke(); + pipeline.Dispose(); + runspace.Dispose(); + return results; + + } + + public override List Render(frmCommandEditor editor) + { + base.Render(editor); + + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_ScriptPath", this, editor)); + + + + return RenderedControls; + } + + public override string GetDisplayValue() + { + return base.GetDisplayValue() + " [Script Path: " + v_ScriptPath + "]"; + } + } +} \ No newline at end of file diff --git a/taskt/Core/Automation/Commands/ScriptCommand.cs b/taskt/Core/Automation/Commands/ScriptCommand.cs index f3ba71eae..db0f8e21f 100644 --- a/taskt/Core/Automation/Commands/ScriptCommand.cs +++ b/taskt/Core/Automation/Commands/ScriptCommand.cs @@ -40,6 +40,7 @@ namespace taskt.Core.Automation.Commands [XmlInclude(typeof(AddVariableCommand))] [XmlInclude(typeof(VariableCommand))] [XmlInclude(typeof(RunScriptCommand))] + [XmlInclude(typeof(RunPowerShellScriptCommand))] [XmlInclude(typeof(CloseWindowCommand))] [XmlInclude(typeof(SetWindowStateCommand))] [XmlInclude(typeof(BeginExcelDatasetLoopCommand))] diff --git a/taskt/UI/CustomControls/CustomControls.cs b/taskt/UI/CustomControls/CustomControls.cs index 4e486591e..43e889615 100644 --- a/taskt/UI/CustomControls/CustomControls.cs +++ b/taskt/UI/CustomControls/CustomControls.cs @@ -452,6 +452,7 @@ public static Dictionary UIImageDictionary() uiImages.Add("GetWordLengthCommand", taskt.Properties.Resources.command_function); uiImages.Add("GetWordCountCommand", taskt.Properties.Resources.command_function); uiImages.Add("RunScriptCommand", taskt.Properties.Resources.command_script); + uiImages.Add("RunPowerShellScriptCommand", taskt.Properties.Resources.command_script); uiImages.Add("RunCustomCodeCommand", taskt.Properties.Resources.command_script); uiImages.Add("RunTaskCommand", taskt.Properties.Resources.command_start_process); uiImages.Add("StopTaskCommand", taskt.Properties.Resources.command_stop_process); diff --git a/taskt/packages.config b/taskt/packages.config index 008b754c8..bbd2048bd 100644 --- a/taskt/packages.config +++ b/taskt/packages.config @@ -20,6 +20,7 @@ limitations under the License. + diff --git a/taskt/taskt.csproj b/taskt/taskt.csproj index 00230a008..0f9e98fc8 100644 --- a/taskt/taskt.csproj +++ b/taskt/taskt.csproj @@ -133,6 +133,9 @@ + + ..\packages\Microsoft.PowerShell.5.ReferenceAssemblies.1.1.0\lib\net4\System.Management.Automation.dll + @@ -202,6 +205,7 @@ + From fcd3fe5eb422c972194eb75b0b78741a92cdae5d Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Tue, 17 Mar 2020 16:12:32 -0400 Subject: [PATCH 02/33] Started Split Range --- .../Automation/Commands/ExcelSplitRangeByColumn.cs | 12 ++++++++++++ taskt/taskt.csproj | 1 + 2 files changed, 13 insertions(+) create mode 100644 taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs new file mode 100644 index 000000000..75e2f37e0 --- /dev/null +++ b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace taskt.Core.Automation.Commands +{ + public class ExcelSplitRangeByColumn + { + } +} diff --git a/taskt/taskt.csproj b/taskt/taskt.csproj index 0f9e98fc8..b753701fb 100644 --- a/taskt/taskt.csproj +++ b/taskt/taskt.csproj @@ -170,6 +170,7 @@ + From 519c7c3732d5f6d858aa93bf3547dfef44d39435 Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 18 Mar 2020 08:26:33 -0400 Subject: [PATCH 03/33] Created a Split Range By Column Command --- .../Commands/ExcelSplitRangeByColumn.cs | 12 -- .../ExcelSplitRangeByColumnCommand.cs | 193 ++++++++++++++++++ .../Core/Automation/Commands/ScriptCommand.cs | 1 + taskt/UI/CustomControls/CustomControls.cs | 1 + taskt/taskt.csproj | 2 +- 5 files changed, 196 insertions(+), 13 deletions(-) delete mode 100644 taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs create mode 100644 taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs deleted file mode 100644 index 75e2f37e0..000000000 --- a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumn.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace taskt.Core.Automation.Commands -{ - public class ExcelSplitRangeByColumn - { - } -} diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs new file mode 100644 index 000000000..e9cf2869f --- /dev/null +++ b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs @@ -0,0 +1,193 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; +using System.Xml.Serialization; +using taskt.UI.CustomControls; +using taskt.UI.Forms; +using System.Data; +using System.Text; +using System.Linq; +using System.IO; + +namespace taskt.Core.Automation.Commands +{ + [Serializable] + [Attributes.ClassAttributes.Group("Excel Commands")] + [Attributes.ClassAttributes.Description("This command gets text from a specified Excel Range and splits it into separate ranges by column.")] + [Attributes.ClassAttributes.UsesDescription("Use this command when you want to split a range into separate ranges.")] + [Attributes.ClassAttributes.ImplementationDescription("This command implements 'Excel Interop' to achieve automation.")] + public class ExcelSplitRangeByColumnCommand : ScriptCommand + { + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] + [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + public string v_InstanceName { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the First Cell Location (ex. A1 or B2)")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.InputSpecification("Enter the actual location of the cell.")] + [Attributes.PropertyAttributes.SampleUsage("A1, B10, [vAddress]")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_ExcelCellAddress1 { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the Second Cell Location (ex. A1 or B2)")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.InputSpecification("Enter the actual location of the cell.")] + [Attributes.PropertyAttributes.SampleUsage("A1, B10, [vAddress]")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_ExcelCellAddress2 { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the Column Name")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.InputSpecification("Enter the name of the column you wish to split by.")] + [Attributes.PropertyAttributes.SampleUsage("ColA, [vColumn]")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_ColumnName { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please indicate the output directory")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFileSelectionHelper)] + [Attributes.PropertyAttributes.InputSpecification("Enter or Select the new directory for the split Excel Files.")] + [Attributes.PropertyAttributes.SampleUsage("C:\\temp\\new path\\ or [vTextFolderPath]")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_OutputDirectory { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Assign DataTable List to Variable")] + [Attributes.PropertyAttributes.InputSpecification("Select or provide a variable from the variable list")] + [Attributes.PropertyAttributes.SampleUsage("**vSomeVariable**")] + [Attributes.PropertyAttributes.Remarks("If you have enabled the setting **Create Missing Variables at Runtime** then you are not required to pre-define your variables, however, it is highly recommended.")] + public string v_userVariableName { get; set; } + + public ExcelSplitRangeByColumnCommand() + { + this.CommandName = "ExcelSplitRangeByColumnCommand"; + this.SelectionName = "Split Range By Column"; + this.CommandEnabled = true; + this.CustomRendering = true; + } + + public override void RunCommand(object sender) + { + var engine = (Core.Automation.Engine.AutomationEngineInstance)sender; + var vInstance = v_InstanceName.ConvertToUserVariable(engine); + var vExcelObject = engine.GetAppInstance(vInstance); + var vTargetAddress1 = v_ExcelCellAddress1.ConvertToUserVariable(sender); + var vTargetAddress2 = v_ExcelCellAddress2.ConvertToUserVariable(sender); + var vColumnName = v_ColumnName.ConvertToUserVariable(sender); + var vOutputDirectory = v_OutputDirectory.ConvertToUserVariable(sender); + + Microsoft.Office.Interop.Excel.Application excelInstance = (Microsoft.Office.Interop.Excel.Application)vExcelObject; + excelInstance.Visible = false; + excelInstance.DisplayAlerts = false; + Microsoft.Office.Interop.Excel.Worksheet excelSheet = excelInstance.ActiveSheet; + var cellValue = excelSheet.Range[vTargetAddress1, vTargetAddress2]; + + //Convert Range to DataTable + List lst = new List(); + int rw = cellValue.Rows.Count; + int cl = cellValue.Columns.Count; + int rCnt; + int cCnt; + string cName; + DataTable DT = new DataTable(); + + //start from row 2 + for (rCnt = 2; rCnt <= rw; rCnt++) + { + DataRow newRow = DT.NewRow(); + for (cCnt = 1; cCnt <= cl; cCnt++) + { + if (((cellValue.Cells[rCnt, cCnt] as Microsoft.Office.Interop.Excel.Range).Value2) != null) + { + if (!DT.Columns.Contains(cCnt.ToString())) + { + DT.Columns.Add(cCnt.ToString()); + } + newRow[cCnt.ToString()] = ((cellValue.Cells[rCnt, cCnt] as Microsoft.Office.Interop.Excel.Range).Value2).ToString(); + } + } + DT.Rows.Add(newRow); + } + + //Set column names + for (cCnt = 1; cCnt <= cl; cCnt++) + { + cName = ((cellValue.Cells[1, cCnt] as Microsoft.Office.Interop.Excel.Range).Value2).ToString(); + DT.Columns[cCnt-1].ColumnName = cName; + } + + //split table by column + List result = DT.AsEnumerable() + .GroupBy(row => row.Field(vColumnName)) + .Select(g => g.CopyToDataTable()) + .ToList(); + + //add list of datatables to output variable + Script.ScriptVariable splitDataset = new Script.ScriptVariable + { + VariableName = v_userVariableName, + VariableValue = result + }; + engine.VariableList.Add(splitDataset); + + //save split datatables in individual workbooks labeled by selected column data + string newName; + foreach (DataTable newDT in result) + { + newName = newDT.Rows[0].Field(vColumnName).ToString(); + Console.WriteLine(newName); + Microsoft.Office.Interop.Excel.Workbook newWorkBook = excelInstance.Workbooks.Add(Type.Missing); + Microsoft.Office.Interop.Excel.Worksheet newSheet = newWorkBook.ActiveSheet; + for (int i = 1; i < newDT.Columns.Count + 1; i++) + { + newSheet.Cells[1, i] = newDT.Columns[i - 1].ColumnName; + } + + for (int j = 0; j < newDT.Rows.Count; j++) + { + for (int k = 0; k < newDT.Columns.Count; k++) + { + newSheet.Cells[j + 2, k + 1] = newDT.Rows[j].ItemArray[k].ToString(); + } + } + newWorkBook.SaveAs(Path.Combine(vOutputDirectory, newName + ".xlsx")); + } + } + + public override List Render(frmCommandEditor editor) + { + base.Render(editor); + + //create standard group controls + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_InstanceName", this, editor)); + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_ExcelCellAddress1", this, editor)); + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_ExcelCellAddress2", this, editor)); + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_ColumnName", this, editor)); + RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_OutputDirectory", this, editor)); + //create control for variable name + RenderedControls.Add(CommandControls.CreateDefaultLabelFor("v_userVariableName", this)); + var VariableNameControl = CommandControls.CreateStandardComboboxFor("v_userVariableName", this).AddVariableNames(editor); + RenderedControls.AddRange(CommandControls.CreateUIHelpersFor("v_userVariableName", this, new Control[] { VariableNameControl }, editor)); + RenderedControls.Add(VariableNameControl); + + //RenderedControls.AddRange(CommandControls.CreateDefaultDropdownGroupFor("v_Output", this, editor)); + + + return RenderedControls; + + } + + public override string GetDisplayValue() + { + return base.GetDisplayValue() + " [Get Value Between '" + v_ExcelCellAddress1 + " and " + v_ExcelCellAddress2 + "' and apply to variable '" + v_userVariableName + "'from, Instance Name: '" + v_InstanceName + "', Split By Column: '" + v_ColumnName + "']"; + } + } +} diff --git a/taskt/Core/Automation/Commands/ScriptCommand.cs b/taskt/Core/Automation/Commands/ScriptCommand.cs index db0f8e21f..4dc15dede 100644 --- a/taskt/Core/Automation/Commands/ScriptCommand.cs +++ b/taskt/Core/Automation/Commands/ScriptCommand.cs @@ -31,6 +31,7 @@ namespace taskt.Core.Automation.Commands [XmlInclude(typeof(ExcelGetRangeCommandAsDT))] [XmlInclude(typeof(ExcelGetRangeCommand))] [XmlInclude(typeof(ExcelWriteRangeCommand))] + [XmlInclude(typeof(ExcelSplitRangeByColumnCommand))] [XmlInclude(typeof(UIAutomationCommand))] [XmlInclude(typeof(ResizeWindowCommand))] [XmlInclude(typeof(WaitForWindowCommand))] diff --git a/taskt/UI/CustomControls/CustomControls.cs b/taskt/UI/CustomControls/CustomControls.cs index 43e889615..750fd3aac 100644 --- a/taskt/UI/CustomControls/CustomControls.cs +++ b/taskt/UI/CustomControls/CustomControls.cs @@ -486,6 +486,7 @@ public static Dictionary UIImageDictionary() uiImages.Add("ExcelGetLastRowCommand", taskt.Properties.Resources.command_spreadsheet); uiImages.Add("ExcelSaveCommand", taskt.Properties.Resources.command_spreadsheet); uiImages.Add("ExcelActivateSheetCommand", taskt.Properties.Resources.command_spreadsheet); + uiImages.Add("ExcelSplitRangeByColumnCommand", taskt.Properties.Resources.command_spreadsheet); uiImages.Add("AddDataRowCommand", taskt.Properties.Resources.command_spreadsheet); uiImages.Add("CreateDataTableCommand", taskt.Properties.Resources.command_spreadsheet); uiImages.Add("FilterDataTableCommand", taskt.Properties.Resources.command_spreadsheet); diff --git a/taskt/taskt.csproj b/taskt/taskt.csproj index b753701fb..8fdcf3701 100644 --- a/taskt/taskt.csproj +++ b/taskt/taskt.csproj @@ -170,7 +170,7 @@ - + From d5644a4f0975f4a261faa9ddde4628d8b8ba14ad Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 18 Mar 2020 12:57:40 -0400 Subject: [PATCH 04/33] Begin Loop Command --- .../Automation/Commands/BeginLoopCommand.cs | 958 ++++++++++++++++++ .../Core/Automation/Commands/ScriptCommand.cs | 1 + .../Engine/AutomationEngineInstance.cs | 2 +- taskt/Core/Script.cs | 2 +- taskt/UI/CustomControls/CustomControls.cs | 1 + taskt/UI/Forms/frmScriptBuilder.cs | 6 +- taskt/taskt.csproj | 1 + 7 files changed, 966 insertions(+), 5 deletions(-) create mode 100644 taskt/Core/Automation/Commands/BeginLoopCommand.cs diff --git a/taskt/Core/Automation/Commands/BeginLoopCommand.cs b/taskt/Core/Automation/Commands/BeginLoopCommand.cs new file mode 100644 index 000000000..bf09648ee --- /dev/null +++ b/taskt/Core/Automation/Commands/BeginLoopCommand.cs @@ -0,0 +1,958 @@ +using System; +using System.Linq; +using System.Xml.Serialization; +using System.Data; +using taskt.Core.Automation.User32; +using System.Collections.Generic; +using System.Windows.Forms; +using taskt.UI.Forms; +using taskt.UI.CustomControls; +using System.Drawing; +using System.Text; + +namespace taskt.Core.Automation.Commands +{ + [Serializable] + [Attributes.ClassAttributes.Group("Loop Commands")] + [Attributes.ClassAttributes.Description("This command allows you to evaluate a logical statement to determine if the statement is true. The following actions will repeat continuously until that statement becomes false")] + [Attributes.ClassAttributes.UsesDescription("Use this command when you want to check if a statement is 'true' or 'false' and subsequently loop actions based on either condition. Any 'BeginLoop' command must have a following 'EndLoop' command.")] + [Attributes.ClassAttributes.ImplementationDescription("This command evaluates supplied arguments and if evaluated to true runs sub elements")] + public class BeginLoopCommand : ScriptCommand + { + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Please select type of Loop Command")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Value")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Date Compare")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Variable Compare")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Variable Has Value")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Variable Is Numeric")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Window Name Exists")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Active Window Name Is")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("File Exists")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Folder Exists")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Web Element Exists")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("GUI Element Exists")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Error Occured")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Error Did Not Occur")] + [Attributes.PropertyAttributes.InputSpecification("Select the necessary comparison type.")] + [Attributes.PropertyAttributes.SampleUsage("Select **Value**, **Window Name Exists**, **Active Window Name Is**, **File Exists**, **Folder Exists**, **Web Element Exists**, **Error Occured**")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_LoopActionType { get; set; } + + [XmlElement] + [Attributes.PropertyAttributes.PropertyDescription("Additional Parameters")] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.InputSpecification("Select the required comparison parameters.")] + [Attributes.PropertyAttributes.SampleUsage("n/a")] + [Attributes.PropertyAttributes.Remarks("")] + public DataTable v_LoopActionParameterTable { get; set; } + + [XmlIgnore] + [NonSerialized] + private DataGridView LoopGridViewHelper; + + [XmlIgnore] + [NonSerialized] + private ComboBox ActionDropdown; + + [XmlIgnore] + [NonSerialized] + private List ParameterControls; + + [XmlIgnore] + [NonSerialized] + CommandItemControl RecorderControl; + + public BeginLoopCommand() + { + this.CommandName = "BeginLoopCommand"; + this.SelectionName = "Begin Loop"; + this.CommandEnabled = true; + this.CustomRendering = true; + + //define parameter table + this.v_LoopActionParameterTable = new System.Data.DataTable + { + TableName = DateTime.Now.ToString("LoopActionParamTable" + DateTime.Now.ToString("MMddyy.hhmmss")) + }; + this.v_LoopActionParameterTable.Columns.Add("Parameter Name"); + this.v_LoopActionParameterTable.Columns.Add("Parameter Value"); + + LoopGridViewHelper = new DataGridView(); + LoopGridViewHelper.AllowUserToAddRows = true; + LoopGridViewHelper.AllowUserToDeleteRows = true; + LoopGridViewHelper.Size = new Size(400, 250); + LoopGridViewHelper.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; + LoopGridViewHelper.DataBindings.Add("DataSource", this, "v_LoopActionParameterTable", false, DataSourceUpdateMode.OnPropertyChanged); + LoopGridViewHelper.AllowUserToAddRows = false; + LoopGridViewHelper.AllowUserToDeleteRows = false; + LoopGridViewHelper.MouseEnter += LoopGridViewHelper_MouseEnter; + + RecorderControl = new taskt.UI.CustomControls.CommandItemControl(); + RecorderControl.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); + RecorderControl.ForeColor = Color.AliceBlue; + RecorderControl.Name = "guirecorder_helper"; + RecorderControl.CommandImage = UI.Images.GetUIImage("ClipboardGetTextCommand"); + RecorderControl.CommandDisplay = "Element Recorder"; + RecorderControl.Click += ShowLoopElementRecorder; + RecorderControl.Hide(); + } + private void LoopGridViewHelper_MouseEnter(object sender, EventArgs e) + { + loopAction_SelectionChangeCommitted(null, null); + } + public override void RunCommand(object sender, Core.Script.ScriptAction parentCommand) + { + //Core.Automation.Commands.BeginLoopCommand loopCommand = (Core.Automation.Commands.BeginLoopCommand)parentCommand.ScriptCommand; + var engine = (Core.Automation.Engine.AutomationEngineInstance)sender; + var loopResult = DetermineStatementTruth(sender); + engine.ReportProgress("Starting Loop"); //From Line " + loopCommand.LineNumber); + + while (loopResult) + { + foreach (var cmd in parentCommand.AdditionalScriptCommands) + { + if (engine.IsCancellationPending) + return; + + engine.ExecuteCommand(cmd); + + if (engine.CurrentLoopCancelled) + { + engine.ReportProgress("Exiting Loop"); // From Line " + loopCommand.LineNumber); + engine.CurrentLoopCancelled = false; + return; + } + + if (engine.CurrentLoopContinuing) + { + engine.ReportProgress("Continuing Next Loop"); // From Line " + loopCommand.LineNumber); + engine.CurrentLoopContinuing = false; + break; + } + } + loopResult = DetermineStatementTruth(sender); + } + } + + public bool DetermineStatementTruth(object sender) + { + var engine = (Core.Automation.Engine.AutomationEngineInstance)sender; + + bool loopResult = false; + + if (v_LoopActionType == "Value") + { + string value1 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value1" + select rw.Field("Parameter Value")).FirstOrDefault()); + string operand = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Operand" + select rw.Field("Parameter Value")).FirstOrDefault()); + string value2 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value2" + select rw.Field("Parameter Value")).FirstOrDefault()); + + value1 = value1.ConvertToUserVariable(sender); + value2 = value2.ConvertToUserVariable(sender); + + + + decimal cdecValue1, cdecValue2; + + switch (operand) + { + case "is equal to": + loopResult = (value1 == value2); + break; + + case "is not equal to": + loopResult = (value1 != value2); + break; + + case "is greater than": + cdecValue1 = Convert.ToDecimal(value1); + cdecValue2 = Convert.ToDecimal(value2); + loopResult = (cdecValue1 > cdecValue2); + break; + + case "is greater than or equal to": + cdecValue1 = Convert.ToDecimal(value1); + cdecValue2 = Convert.ToDecimal(value2); + loopResult = (cdecValue1 >= cdecValue2); + break; + + case "is less than": + cdecValue1 = Convert.ToDecimal(value1); + cdecValue2 = Convert.ToDecimal(value2); + loopResult = (cdecValue1 < cdecValue2); + break; + + case "is less than or equal to": + cdecValue1 = Convert.ToDecimal(value1); + cdecValue2 = Convert.ToDecimal(value2); + loopResult = (cdecValue1 <= cdecValue2); + break; + } + } + else if (v_LoopActionType == "Date Compare") + { + string value1 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value1" + select rw.Field("Parameter Value")).FirstOrDefault()); + string operand = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Operand" + select rw.Field("Parameter Value")).FirstOrDefault()); + string value2 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value2" + select rw.Field("Parameter Value")).FirstOrDefault()); + + value1 = value1.ConvertToUserVariable(sender); + value2 = value2.ConvertToUserVariable(sender); + + + + DateTime dt1, dt2; + dt1 = DateTime.Parse(value1); + dt2 = DateTime.Parse(value2); + switch (operand) + { + case "is equal to": + loopResult = (dt1 == dt2); + break; + + case "is not equal to": + loopResult = (dt1 != dt2); + break; + + case "is greater than": + loopResult = (dt1 > dt2); + break; + + case "is greater than or equal to": + loopResult = (dt1 >= dt2); + break; + + case "is less than": + loopResult = (dt1 < dt2); + break; + + case "is less than or equal to": + loopResult = (dt1 <= dt2); + break; + } + } + else if (v_LoopActionType == "Variable Compare") + { + string value1 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value1" + select rw.Field("Parameter Value")).FirstOrDefault()); + string operand = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Operand" + select rw.Field("Parameter Value")).FirstOrDefault()); + string value2 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value2" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string caseSensitive = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Case Sensitive" + select rw.Field("Parameter Value")).FirstOrDefault()); + + value1 = value1.ConvertToUserVariable(sender); + value2 = value2.ConvertToUserVariable(sender); + + if (caseSensitive == "No") + { + value1 = value1.ToUpper(); + value2 = value2.ToUpper(); + } + + + + switch (operand) + { + case "contains": + loopResult = (value1.Contains(value2)); + break; + + case "does not contain": + loopResult = (!value1.Contains(value2)); + break; + + case "is equal to": + loopResult = (value1 == value2); + break; + + case "is not equal to": + loopResult = (value1 != value2); + break; + } + } + else if (v_LoopActionType == "Variable Has Value") + { + string variableName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Variable Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + var actualVariable = variableName.ConvertToUserVariable(sender).Trim(); + + if (!string.IsNullOrEmpty(actualVariable)) + { + loopResult = true; + } + else + { + loopResult = false; + } + + } + else if (v_LoopActionType == "Variable Is Numeric") + { + string variableName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Variable Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + var actualVariable = variableName.ConvertToUserVariable(sender).Trim(); + + var numericTest = decimal.TryParse(actualVariable, out decimal parsedResult); + + if (numericTest) + { + loopResult = true; + } + else + { + loopResult = false; + } + + } + else if (v_LoopActionType == "Error Occured") + { + //get line number + string userLineNumber = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Line Number" + select rw.Field("Parameter Value")).FirstOrDefault()); + + //convert to variable + string variableLineNumber = userLineNumber.ConvertToUserVariable(sender); + + //convert to int + int lineNumber = int.Parse(variableLineNumber); + + //determine if error happened + if (engine.ErrorsOccured.Where(f => f.LineNumber == lineNumber).Count() > 0) + { + + var error = engine.ErrorsOccured.Where(f => f.LineNumber == lineNumber).FirstOrDefault(); + error.ErrorMessage.StoreInUserVariable(sender, "Error.Message"); + error.LineNumber.ToString().StoreInUserVariable(sender, "Error.Line"); + error.StackTrace.StoreInUserVariable(sender, "Error.StackTrace"); + + loopResult = true; + } + else + { + loopResult = false; + } + + } + else if (v_LoopActionType == "Error Did Not Occur") + { + //get line number + string userLineNumber = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Line Number" + select rw.Field("Parameter Value")).FirstOrDefault()); + + //convert to variable + string variableLineNumber = userLineNumber.ConvertToUserVariable(sender); + + //convert to int + int lineNumber = int.Parse(variableLineNumber); + + //determine if error happened + if (engine.ErrorsOccured.Where(f => f.LineNumber == lineNumber).Count() == 0) + { + loopResult = true; + } + else + { + var error = engine.ErrorsOccured.Where(f => f.LineNumber == lineNumber).FirstOrDefault(); + error.ErrorMessage.StoreInUserVariable(sender, "Error.Message"); + error.LineNumber.ToString().StoreInUserVariable(sender, "Error.Line"); + error.StackTrace.StoreInUserVariable(sender, "Error.StackTrace"); + + loopResult = false; + } + + } + else if (v_LoopActionType == "Window Name Exists") + { + //get user supplied name + string windowName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Window Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + //variable translation + string variablizedWindowName = windowName.ConvertToUserVariable(sender); + + //search for window + IntPtr windowPtr = User32Functions.FindWindow(variablizedWindowName); + + //conditional + if (windowPtr != IntPtr.Zero) + { + loopResult = true; + } + + + + } + else if (v_LoopActionType == "Active Window Name Is") + { + string windowName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Window Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string variablizedWindowName = windowName.ConvertToUserVariable(sender); + + var currentWindowTitle = User32Functions.GetActiveWindowTitle(); + + if (currentWindowTitle == variablizedWindowName) + { + loopResult = true; + } + + } + else if (v_LoopActionType == "File Exists") + { + + string fileName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "File Path" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string trueWhenFileExists = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "True When" + select rw.Field("Parameter Value")).FirstOrDefault()); + + var userFileSelected = fileName.ConvertToUserVariable(sender); + + bool existCheck = false; + if (trueWhenFileExists == "It Does Exist") + { + existCheck = true; + } + + + if (System.IO.File.Exists(userFileSelected) == existCheck) + { + loopResult = true; + } + + + } + else if (v_LoopActionType == "Folder Exists") + { + string folderName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Folder Path" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string trueWhenFileExists = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "True When" + select rw.Field("Parameter Value")).FirstOrDefault()); + + var userFolderSelected = folderName.ConvertToUserVariable(sender); + + bool existCheck = false; + if (trueWhenFileExists == "It Does Exist") + { + existCheck = true; + } + + + if (System.IO.Directory.Exists(folderName) == existCheck) + { + loopResult = true; + } + + } + else if (v_LoopActionType == "Web Element Exists") + { + string instanceName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Selenium Instance Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string parameterName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Parameter" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string searchMethod = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Method" + select rw.Field("Parameter Value")).FirstOrDefault()); + + + SeleniumBrowserElementActionCommand newElementActionCommand = new SeleniumBrowserElementActionCommand(); + newElementActionCommand.v_SeleniumSearchType = searchMethod; + newElementActionCommand.v_InstanceName = instanceName.ConvertToUserVariable(sender); + bool elementExists = newElementActionCommand.ElementExists(sender, searchMethod, parameterName); + loopResult = elementExists; + + } + else if (v_LoopActionType == "GUI Element Exists") + { + string windowName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Window Name" + select rw.Field("Parameter Value")).FirstOrDefault().ConvertToUserVariable(sender)); + + string elementSearchParam = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Parameter" + select rw.Field("Parameter Value")).FirstOrDefault().ConvertToUserVariable(sender)); + + string elementSearchMethod = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Method" + select rw.Field("Parameter Value")).FirstOrDefault().ConvertToUserVariable(sender)); + + + UIAutomationCommand newUIACommand = new UIAutomationCommand(); + newUIACommand.v_WindowName = windowName; + newUIACommand.v_UIASearchParameters.Rows.Add(true, elementSearchMethod, elementSearchParam); + var handle = newUIACommand.SearchForGUIElement(sender, windowName); + + if (handle is null) + { + loopResult = false; + } + else + { + loopResult = true; + } + + + } + else + { + throw new Exception("Loop type not recognized!"); + } + + return loopResult; + } + + public override List Render(frmCommandEditor editor) + { + base.Render(editor); + + ActionDropdown = (ComboBox)CommandControls.CreateDropdownFor("v_LoopActionType", this); + RenderedControls.Add(CommandControls.CreateDefaultLabelFor("v_LoopActionType", this)); + RenderedControls.AddRange(CommandControls.CreateUIHelpersFor("v_LoopActionType", this, new Control[] { ActionDropdown }, editor)); + ActionDropdown.SelectionChangeCommitted += loopAction_SelectionChangeCommitted; + + RenderedControls.Add(ActionDropdown); + + ParameterControls = new List(); + ParameterControls.Add(CommandControls.CreateDefaultLabelFor("v_LoopActionParameterTable", this)); + ParameterControls.Add(RecorderControl); + ParameterControls.AddRange(CommandControls.CreateUIHelpersFor("v_LoopActionParameterTable", this, new Control[] { LoopGridViewHelper }, editor)); + ParameterControls.Add(LoopGridViewHelper); + + RenderedControls.AddRange(ParameterControls); + + return RenderedControls; + } + + private void loopAction_SelectionChangeCommitted(object sender, EventArgs e) + { + ComboBox loopAction = (ComboBox)ActionDropdown; + DataGridView loopActionParameterBox = (DataGridView)LoopGridViewHelper; + + Core.Automation.Commands.BeginLoopCommand cmd = (Core.Automation.Commands.BeginLoopCommand)this; + DataTable actionParameters = cmd.v_LoopActionParameterTable; + + //sender is null when command is updating + if (sender != null) + actionParameters.Rows.Clear(); + + DataGridViewComboBoxCell comparisonComboBox = new DataGridViewComboBoxCell(); + + //recorder control + Control recorderControl = (Control)RecorderControl; + + //remove if exists + if (RecorderControl.Visible) + { + RecorderControl.Hide(); + } + + + switch (loopAction.SelectedItem) + { + case "Value": + case "Date Compare": + + loopActionParameterBox.Visible = true; + + if (sender != null) + { + actionParameters.Rows.Add("Value1", ""); + actionParameters.Rows.Add("Operand", ""); + actionParameters.Rows.Add("Value2", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + //combobox cell for Variable Name + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("is equal to"); + comparisonComboBox.Items.Add("is greater than"); + comparisonComboBox.Items.Add("is greater than or equal to"); + comparisonComboBox.Items.Add("is less than"); + comparisonComboBox.Items.Add("is less than or equal to"); + comparisonComboBox.Items.Add("is not equal to"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = comparisonComboBox; + + break; + case "Variable Compare": + + loopActionParameterBox.Visible = true; + + if (sender != null) + { + actionParameters.Rows.Add("Value1", ""); + actionParameters.Rows.Add("Operand", ""); + actionParameters.Rows.Add("Value2", ""); + actionParameters.Rows.Add("Case Sensitive", "No"); + loopActionParameterBox.DataSource = actionParameters; + } + + //combobox cell for Variable Name + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("contains"); + comparisonComboBox.Items.Add("does not contain"); + comparisonComboBox.Items.Add("is equal to"); + comparisonComboBox.Items.Add("is not equal to"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = comparisonComboBox; + + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("Yes"); + comparisonComboBox.Items.Add("No"); + + //assign cell as a combobox + loopActionParameterBox.Rows[3].Cells[1] = comparisonComboBox; + + break; + + case "Variable Has Value": + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("Variable Name", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + break; + case "Variable Is Numeric": + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("Variable Name", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + break; + case "Error Occured": + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("Line Number", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + break; + case "Error Did Not Occur": + + loopActionParameterBox.Visible = true; + + if (sender != null) + { + actionParameters.Rows.Add("Line Number", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + break; + case "Window Name Exists": + case "Active Window Name Is": + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("Window Name", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + break; + case "File Exists": + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("File Path", ""); + actionParameters.Rows.Add("True When", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + + //combobox cell for Variable Name + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("It Does Exist"); + comparisonComboBox.Items.Add("It Does Not Exist"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = comparisonComboBox; + + break; + case "Folder Exists": + + loopActionParameterBox.Visible = true; + + + if (sender != null) + { + actionParameters.Rows.Add("Folder Path", ""); + actionParameters.Rows.Add("True When", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + //combobox cell for Variable Name + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("It Does Exist"); + comparisonComboBox.Items.Add("It Does Not Exist"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = comparisonComboBox; + break; + case "Web Element Exists": + + loopActionParameterBox.Visible = true; + + if (sender != null) + { + actionParameters.Rows.Add("Selenium Instance Name", "default"); + actionParameters.Rows.Add("Element Search Method", ""); + actionParameters.Rows.Add("Element Search Parameter", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + + + comparisonComboBox = new DataGridViewComboBoxCell(); + comparisonComboBox.Items.Add("Find Element By XPath"); + comparisonComboBox.Items.Add("Find Element By ID"); + comparisonComboBox.Items.Add("Find Element By Name"); + comparisonComboBox.Items.Add("Find Element By Tag Name"); + comparisonComboBox.Items.Add("Find Element By Class Name"); + comparisonComboBox.Items.Add("Find Element By CSS Selector"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = comparisonComboBox; + + break; + case "GUI Element Exists": + + + loopActionParameterBox.Visible = true; + if (sender != null) + { + actionParameters.Rows.Add("Window Name", "Current Window"); + actionParameters.Rows.Add("Element Search Method", ""); + actionParameters.Rows.Add("Element Search Parameter", ""); + loopActionParameterBox.DataSource = actionParameters; + } + + + + var parameterName = new DataGridViewComboBoxCell(); + parameterName.Items.Add("AcceleratorKey"); + parameterName.Items.Add("AccessKey"); + parameterName.Items.Add("AutomationId"); + parameterName.Items.Add("ClassName"); + parameterName.Items.Add("FrameworkId"); + parameterName.Items.Add("HasKeyboardFocus"); + parameterName.Items.Add("HelpText"); + parameterName.Items.Add("IsContentElement"); + parameterName.Items.Add("IsControlElement"); + parameterName.Items.Add("IsEnabled"); + parameterName.Items.Add("IsKeyboardFocusable"); + parameterName.Items.Add("IsOffscreen"); + parameterName.Items.Add("IsPassword"); + parameterName.Items.Add("IsRequiredForForm"); + parameterName.Items.Add("ItemStatus"); + parameterName.Items.Add("ItemType"); + parameterName.Items.Add("LocalizedControlType"); + parameterName.Items.Add("Name"); + parameterName.Items.Add("NativeWindowHandle"); + parameterName.Items.Add("ProcessID"); + + //assign cell as a combobox + loopActionParameterBox.Rows[1].Cells[1] = parameterName; + + RecorderControl.Show(); + + break; + + default: + break; + } + } + + private void ShowLoopElementRecorder(object sender, EventArgs e) + { + //get command reference + Core.Automation.Commands.UIAutomationCommand cmd = new Core.Automation.Commands.UIAutomationCommand(); + + //create recorder + UI.Forms.Supplemental.frmThickAppElementRecorder newElementRecorder = new UI.Forms.Supplemental.frmThickAppElementRecorder(); + newElementRecorder.searchParameters = cmd.v_UIASearchParameters; + + //show form + newElementRecorder.ShowDialog(); + + var sb = new StringBuilder(); + sb.AppendLine("Element Properties Found!"); + sb.AppendLine(Environment.NewLine); + sb.AppendLine("Element Search Method - Element Search Parameter"); + foreach (DataRow rw in cmd.v_UIASearchParameters.Rows) + { + if (rw.ItemArray[2].ToString().Trim() == string.Empty) + continue; + + sb.AppendLine(rw.ItemArray[1].ToString() + " - " + rw.ItemArray[2].ToString()); + } + + DataGridView loopActionBox = LoopGridViewHelper; + loopActionBox.Rows[0].Cells[1].Value = newElementRecorder.cboWindowTitle.Text; + + MessageBox.Show(sb.ToString()); + } + + public override string GetDisplayValue() + { + switch (v_LoopActionType) + { + case "Value": + case "Date Compare": + case "Variable Compare": + string value1 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value1" + select rw.Field("Parameter Value")).FirstOrDefault()); + string operand = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Operand" + select rw.Field("Parameter Value")).FirstOrDefault()); + string value2 = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Value2" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While (" + value1 + " " + operand + " " + value2 + ")"; + + case "Variable Has Value": + string variableName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Variable Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While (Variable " + variableName + " Has Value)"; + case "Variable Is Numeric": + string varName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Variable Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While (Variable " + varName + " Is Numeric)"; + + case "Error Occured": + + string lineNumber = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Line Number" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While (Error Occured on Line Number " + lineNumber + ")"; + case "Error Did Not Occur": + + string lineNum = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Line Number" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While (Error Did Not Occur on Line Number " + lineNum + ")"; + case "Window Name Exists": + case "Active Window Name Is": + + string windowName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Window Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + return "While " + v_LoopActionType + " [Name: " + windowName + "]"; + case "File Exists": + + string filePath = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "File Path" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string fileCompareType = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "True When" + select rw.Field("Parameter Value")).FirstOrDefault()); + + + return "While " + v_LoopActionType + " [File: " + filePath + "]"; + + case "Folder Exists": + + string folderPath = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Folder Path" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string folderCompareType = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "True When" + select rw.Field("Parameter Value")).FirstOrDefault()); + + + return "While " + v_LoopActionType + " [Folder: " + folderPath + "]"; + + case "Web Element Exists": + + + string parameterName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Parameter" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string searchMethod = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Method" + select rw.Field("Parameter Value")).FirstOrDefault()); + + + return "While Web Element Exists [" + searchMethod + ": " + parameterName + "]"; + + case "GUI Element Exists": + + + string guiWindowName = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Window Name" + select rw.Field("Parameter Value")).FirstOrDefault()); + + string guiSearch = ((from rw in v_LoopActionParameterTable.AsEnumerable() + where rw.Field("Parameter Name") == "Element Search Parameter" + select rw.Field("Parameter Value")).FirstOrDefault()); + + + + + return "While GUI Element Exists [Find " + guiSearch + " Element In " + guiWindowName + "]"; + + + default: + + return "While .... "; + } + + } + } +} diff --git a/taskt/Core/Automation/Commands/ScriptCommand.cs b/taskt/Core/Automation/Commands/ScriptCommand.cs index 11f6ac390..c4f327426 100644 --- a/taskt/Core/Automation/Commands/ScriptCommand.cs +++ b/taskt/Core/Automation/Commands/ScriptCommand.cs @@ -98,6 +98,7 @@ namespace taskt.Core.Automation.Commands [XmlInclude(typeof(BeginListLoopCommand))] [XmlInclude(typeof(NextLoopCommand))] [XmlInclude(typeof(BeginContinousLoopCommand))] + [XmlInclude(typeof(BeginLoopCommand))] [XmlInclude(typeof(SequenceCommand))] [XmlInclude(typeof(StopTaskCommand))] [XmlInclude(typeof(RunTaskCommand))] diff --git a/taskt/Core/Automation/Engine/AutomationEngineInstance.cs b/taskt/Core/Automation/Engine/AutomationEngineInstance.cs index 9bb3a2b06..52c0de302 100644 --- a/taskt/Core/Automation/Engine/AutomationEngineInstance.cs +++ b/taskt/Core/Automation/Engine/AutomationEngineInstance.cs @@ -273,7 +273,7 @@ public void ExecuteCommand(Core.Script.ScriptAction command) try { //determine type of command - if ((parentCommand is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (parentCommand is Core.Automation.Commands.BeginContinousLoopCommand) || (parentCommand is Core.Automation.Commands.BeginListLoopCommand) || (parentCommand is Core.Automation.Commands.BeginIfCommand) || (parentCommand is Core.Automation.Commands.BeginMultiIfCommand) || (parentCommand is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (parentCommand is Commands.TryCommand)) + if ((parentCommand is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (parentCommand is Core.Automation.Commands.BeginContinousLoopCommand) || (parentCommand is Core.Automation.Commands.BeginListLoopCommand) || (parentCommand is Core.Automation.Commands.BeginIfCommand) || (parentCommand is Core.Automation.Commands.BeginMultiIfCommand) || (parentCommand is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (parentCommand is Commands.TryCommand) || (parentCommand is Core.Automation.Commands.BeginLoopCommand)) { //run the command and pass bgw/command as this command will recursively call this method for sub commands parentCommand.RunCommand(this, command); diff --git a/taskt/Core/Script.cs b/taskt/Core/Script.cs index a9db7fa26..e6ed25d7c 100644 --- a/taskt/Core/Script.cs +++ b/taskt/Core/Script.cs @@ -74,7 +74,7 @@ public static Script SerializeScript(ListView.ListViewItemCollection scriptComma var command = (Core.Automation.Commands.ScriptCommand)commandItem.Tag; command.LineNumber = lineNumber; - if ((command is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (command is Core.Automation.Commands.BeginContinousLoopCommand) || (command is Core.Automation.Commands.BeginListLoopCommand) || (command is Core.Automation.Commands.BeginIfCommand) || (command is Core.Automation.Commands.BeginMultiIfCommand) || (command is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (command is Core.Automation.Commands.TryCommand)) + if ((command is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (command is Core.Automation.Commands.BeginContinousLoopCommand) || (command is Core.Automation.Commands.BeginListLoopCommand) || (command is Core.Automation.Commands.BeginIfCommand) || (command is Core.Automation.Commands.BeginMultiIfCommand) || (command is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (command is Core.Automation.Commands.TryCommand) || (command is Core.Automation.Commands.BeginLoopCommand)) { if (subCommands.Count == 0) //if this is the first loop { diff --git a/taskt/UI/CustomControls/CustomControls.cs b/taskt/UI/CustomControls/CustomControls.cs index 558ecf3f8..548297f66 100644 --- a/taskt/UI/CustomControls/CustomControls.cs +++ b/taskt/UI/CustomControls/CustomControls.cs @@ -531,6 +531,7 @@ public static Dictionary UIImageDictionary() uiImages.Add("BeginContinousLoopCommand", taskt.Properties.Resources.command_startloop); uiImages.Add("BeginExcelDatasetLoopCommand", taskt.Properties.Resources.command_startloop); uiImages.Add("BeginNumberOfTimesLoopCommand", taskt.Properties.Resources.command_startloop); + uiImages.Add("BeginLoopCommand", taskt.Properties.Resources.command_startloop); uiImages.Add("ExitLoopCommand", taskt.Properties.Resources.command_exitloop); uiImages.Add("SequenceCommand", taskt.Properties.Resources.command_sequence); uiImages.Add("ReadTextFileCommand", taskt.Properties.Resources.command_files); diff --git a/taskt/UI/Forms/frmScriptBuilder.cs b/taskt/UI/Forms/frmScriptBuilder.cs index f9ba48d35..71f8655fc 100644 --- a/taskt/UI/Forms/frmScriptBuilder.cs +++ b/taskt/UI/Forms/frmScriptBuilder.cs @@ -892,7 +892,7 @@ public void AddCommandToListView(Core.Automation.Commands.ScriptCommand selected lstScriptActions.Items.Insert(insertionIndex, command); //special types also get a following command and comment - if ((selectedCommand is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginListLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginContinousLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginNumberOfTimesLoopCommand)) + if ((selectedCommand is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginListLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginContinousLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (selectedCommand is Core.Automation.Commands.BeginLoopCommand)) { lstScriptActions.Items.Insert(insertionIndex + 1, CreateScriptCommandListViewItem(new Core.Automation.Commands.CommentCommand() { v_Comment = "Items in this section will run within the loop" })); lstScriptActions.Items.Insert(insertionIndex + 2, CreateScriptCommandListViewItem(new Core.Automation.Commands.EndLoopCommand())); @@ -933,7 +933,7 @@ private void IndentListViewItems() continue; } - if ((rowItem.Tag is Core.Automation.Commands.BeginIfCommand) || (rowItem.Tag is Core.Automation.Commands.BeginMultiIfCommand) || (rowItem.Tag is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginListLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginContinousLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (rowItem.Tag is Core.Automation.Commands.TryCommand)) + if ((rowItem.Tag is Core.Automation.Commands.BeginIfCommand) || (rowItem.Tag is Core.Automation.Commands.BeginMultiIfCommand) || (rowItem.Tag is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginListLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginContinousLoopCommand) || (rowItem.Tag is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (rowItem.Tag is Core.Automation.Commands.TryCommand) || (rowItem.Tag is Core.Automation.Commands.BeginLoopCommand)) { indent += 2; rowItem.IndentCount = indent; @@ -1491,7 +1491,7 @@ private void SaveToFile(bool saveAs) int tryCatchValidationCount = 0; foreach (ListViewItem item in lstScriptActions.Items) { - if ((item.Tag is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (item.Tag is Core.Automation.Commands.BeginListLoopCommand) || (item.Tag is Core.Automation.Commands.BeginContinousLoopCommand) ||(item.Tag is Core.Automation.Commands.BeginNumberOfTimesLoopCommand)) + if ((item.Tag is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (item.Tag is Core.Automation.Commands.BeginListLoopCommand) || (item.Tag is Core.Automation.Commands.BeginContinousLoopCommand) ||(item.Tag is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (item.Tag is Core.Automation.Commands.BeginLoopCommand)) { beginLoopValidationCount++; } diff --git a/taskt/taskt.csproj b/taskt/taskt.csproj index ab859c245..6aea34d52 100644 --- a/taskt/taskt.csproj +++ b/taskt/taskt.csproj @@ -168,6 +168,7 @@ + From acb317414fcf68e6b7a451dc7975f46b7239be9d Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 18 Mar 2020 14:16:21 -0400 Subject: [PATCH 05/33] Modified Get Emails Command --- .../ExcelSplitRangeByColumnCommand.cs | 33 ++++++------ .../Commands/OutlookGetEmailsCommand.cs | 51 ++++++++++++++++--- 2 files changed, 61 insertions(+), 23 deletions(-) diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs index e9cf2869f..9ef299b86 100644 --- a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs @@ -139,27 +139,30 @@ public override void RunCommand(object sender) engine.VariableList.Add(splitDataset); //save split datatables in individual workbooks labeled by selected column data - string newName; - foreach (DataTable newDT in result) + if (Directory.Exists(vOutputDirectory)) { - newName = newDT.Rows[0].Field(vColumnName).ToString(); - Console.WriteLine(newName); - Microsoft.Office.Interop.Excel.Workbook newWorkBook = excelInstance.Workbooks.Add(Type.Missing); - Microsoft.Office.Interop.Excel.Worksheet newSheet = newWorkBook.ActiveSheet; - for (int i = 1; i < newDT.Columns.Count + 1; i++) + string newName; + foreach (DataTable newDT in result) { - newSheet.Cells[1, i] = newDT.Columns[i - 1].ColumnName; - } + newName = newDT.Rows[0].Field(vColumnName).ToString(); + Console.WriteLine(newName); + Microsoft.Office.Interop.Excel.Workbook newWorkBook = excelInstance.Workbooks.Add(Type.Missing); + Microsoft.Office.Interop.Excel.Worksheet newSheet = newWorkBook.ActiveSheet; + for (int i = 1; i < newDT.Columns.Count + 1; i++) + { + newSheet.Cells[1, i] = newDT.Columns[i - 1].ColumnName; + } - for (int j = 0; j < newDT.Rows.Count; j++) - { - for (int k = 0; k < newDT.Columns.Count; k++) + for (int j = 0; j < newDT.Rows.Count; j++) { - newSheet.Cells[j + 2, k + 1] = newDT.Rows[j].ItemArray[k].ToString(); + for (int k = 0; k < newDT.Columns.Count; k++) + { + newSheet.Cells[j + 2, k + 1] = newDT.Rows[j].ItemArray[k].ToString(); + } } + newWorkBook.SaveAs(Path.Combine(vOutputDirectory, newName + ".xlsx")); } - newWorkBook.SaveAs(Path.Combine(vOutputDirectory, newName + ".xlsx")); - } + } } public override List Render(frmCommandEditor editor) diff --git a/taskt/Core/Automation/Commands/OutlookGetEmailsCommand.cs b/taskt/Core/Automation/Commands/OutlookGetEmailsCommand.cs index 6e4647757..5006fc0e4 100644 --- a/taskt/Core/Automation/Commands/OutlookGetEmailsCommand.cs +++ b/taskt/Core/Automation/Commands/OutlookGetEmailsCommand.cs @@ -44,6 +44,15 @@ public class OutlookGetEmailsCommand : ScriptCommand [Attributes.PropertyAttributes.Remarks("")] public string v_GetUnreadOnly { get; set; } + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Mark emails as read")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("Yes")] + [Attributes.PropertyAttributes.PropertyUISelectionOption("No")] + [Attributes.PropertyAttributes.InputSpecification("Specify whether to retrieve unread email messages only")] + [Attributes.PropertyAttributes.SampleUsage("Select **Yes** or **No**")] + [Attributes.PropertyAttributes.Remarks("")] + public string v_MarkAsRead { get; set; } + [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the output directory for the messages")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] @@ -54,13 +63,20 @@ public class OutlookGetEmailsCommand : ScriptCommand public string v_MessageDirectory { get; set; } [XmlAttribute] - [Attributes.PropertyAttributes.PropertyDescription("Save attachments")] + [Attributes.PropertyAttributes.PropertyDescription("Assign MailItem List to variable")] + [Attributes.PropertyAttributes.InputSpecification("Select or provide a variable from the variable list")] + [Attributes.PropertyAttributes.SampleUsage("**vSomeVariable**")] + [Attributes.PropertyAttributes.Remarks("If you have enabled the setting **Create Missing Variables at Runtime** then you are not required to pre-define your variables, however, it is highly recommended.")] + public string v_userVariableName { get; set; } + + [XmlAttribute] + [Attributes.PropertyAttributes.PropertyDescription("Save messages and attachments")] [Attributes.PropertyAttributes.PropertyUISelectionOption("Yes")] [Attributes.PropertyAttributes.PropertyUISelectionOption("No")] [Attributes.PropertyAttributes.InputSpecification("Specify whether to save the email attachments to a local directory")] [Attributes.PropertyAttributes.SampleUsage("Select **Yes** or **No**")] [Attributes.PropertyAttributes.Remarks("")] - public string v_SaveAttachments { get; set; } + public string v_SaveMessagesAndAttachments { get; set; } [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the output directory for the attachments")] @@ -71,8 +87,6 @@ public class OutlookGetEmailsCommand : ScriptCommand [Attributes.PropertyAttributes.Remarks("")] public string v_AttachmentDirectory { get; set; } - - public OutlookGetEmailsCommand() { this.CommandName = "OutlookGetEmailsCommand"; @@ -108,6 +122,8 @@ public override void RunCommand(object sender) filteredItems = userFolder.Items; } + List outMail = new List(); + foreach (object _obj in filteredItems) { if (_obj is MailItem) @@ -118,20 +134,33 @@ public override void RunCommand(object sender) if (tempMail.UnRead == true) { ProcessEmail(tempMail, vMessageDirectory, vAttachmentDirectory); + outMail.Add(tempMail); } } else { ProcessEmail(tempMail, vMessageDirectory, vAttachmentDirectory); + outMail.Add(tempMail); } } } + //add list of datatables to output variable + Script.ScriptVariable mailItemList = new Script.ScriptVariable + { + VariableName = v_userVariableName, + VariableValue = outMail + }; + engine.VariableList.Add(mailItemList); } } private void ProcessEmail(MailItem mail, string msgDirectory, string attDirectory) { - mail.SaveAs(System.IO.Path.Combine(msgDirectory, mail.Subject + ".msg")); - if (v_SaveAttachments == "Yes") + if (v_MarkAsRead == "Yes") { + mail.UnRead = false; + } + if (v_SaveMessagesAndAttachments == "Yes" && System.IO.Directory.Exists(msgDirectory) && System.IO.Directory.Exists(attDirectory)) + { + mail.SaveAs(System.IO.Path.Combine(msgDirectory, mail.Subject + ".msg")); foreach (Attachment attachment in mail.Attachments) { attachment.SaveAsFile(System.IO.Path.Combine(attDirectory, attachment.FileName)); @@ -145,10 +174,16 @@ public override List Render(frmCommandEditor editor) RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_Folder", this, editor)); RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_Filter", this, editor)); RenderedControls.AddRange(CommandControls.CreateDefaultDropdownGroupFor("v_GetUnreadOnly", this, editor)); + RenderedControls.AddRange(CommandControls.CreateDefaultDropdownGroupFor("v_MarkAsRead", this, editor)); + //create control for variable name + RenderedControls.Add(CommandControls.CreateDefaultLabelFor("v_userVariableName", this)); + var VariableNameControl = CommandControls.CreateStandardComboboxFor("v_userVariableName", this).AddVariableNames(editor); + RenderedControls.AddRange(CommandControls.CreateUIHelpersFor("v_userVariableName", this, new Control[] { VariableNameControl }, editor)); + RenderedControls.Add(VariableNameControl); + RenderedControls.AddRange(CommandControls.CreateDefaultDropdownGroupFor("v_SaveMessagesAndAttachments", this, editor)); RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_MessageDirectory", this, editor)); - RenderedControls.AddRange(CommandControls.CreateDefaultDropdownGroupFor("v_SaveAttachments", this, editor)); RenderedControls.AddRange(CommandControls.CreateDefaultInputGroupFor("v_AttachmentDirectory", this, editor)); - + return RenderedControls; } From 9fa45492c7498c19cc1d5b70f0a091ed27ef8907 Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 18 Mar 2020 14:18:54 -0400 Subject: [PATCH 06/33] updated outlook sample xml --- taskt/Sample Scripts/Outlook Sample.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/taskt/Sample Scripts/Outlook Sample.xml b/taskt/Sample Scripts/Outlook Sample.xml index 95492cce8..cc90c594a 100644 --- a/taskt/Sample Scripts/Outlook Sample.xml +++ b/taskt/Sample Scripts/Outlook Sample.xml @@ -2,7 +2,7 @@ \ No newline at end of file From a2bd8ead555350652f7850bbe21eea78d2c2268a Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 15 Apr 2020 16:45:50 -0400 Subject: [PATCH 30/33] More Sample Scripts --- .../ExcelSplitRangeByColumnCommand.cs | 2 +- taskt/Sample Scripts/Data Sample.xml | 213 ++++++++++++++++++ .../Excel Split Range By Column Sample.xml | 18 ++ 3 files changed, 232 insertions(+), 1 deletion(-) create mode 100644 taskt/Sample Scripts/Data Sample.xml create mode 100644 taskt/Sample Scripts/Excel Split Range By Column Sample.xml diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs index c6ca37595..722048292 100644 --- a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs @@ -53,7 +53,7 @@ public class ExcelSplitRangeByColumnCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the output directory")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] - [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFileSelectionHelper)] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFolderSelectionHelper)] [Attributes.PropertyAttributes.InputSpecification("Enter or Select the new directory for the split Excel Files.")] [Attributes.PropertyAttributes.SampleUsage("C:\\temp\\new path\\ or [vTextFolderPath]")] [Attributes.PropertyAttributes.Remarks("")] diff --git a/taskt/Sample Scripts/Data Sample.xml b/taskt/Sample Scripts/Data Sample.xml new file mode 100644 index 000000000..a1158bdfa --- /dev/null +++ b/taskt/Sample Scripts/Data Sample.xml @@ -0,0 +1,213 @@ + + \ No newline at end of file diff --git a/taskt/Sample Scripts/Excel Split Range By Column Sample.xml b/taskt/Sample Scripts/Excel Split Range By Column Sample.xml new file mode 100644 index 000000000..8ec9e78d0 --- /dev/null +++ b/taskt/Sample Scripts/Excel Split Range By Column Sample.xml @@ -0,0 +1,18 @@ + + \ No newline at end of file From 45b0e59870ac2fc48061a0370c9a4b46106179a9 Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Wed, 15 Apr 2020 16:57:47 -0400 Subject: [PATCH 31/33] fixed file name --- taskt/Sample Scripts/{Data Sample.xml => DataTable Sample.xml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename taskt/Sample Scripts/{Data Sample.xml => DataTable Sample.xml} (100%) diff --git a/taskt/Sample Scripts/Data Sample.xml b/taskt/Sample Scripts/DataTable Sample.xml similarity index 100% rename from taskt/Sample Scripts/Data Sample.xml rename to taskt/Sample Scripts/DataTable Sample.xml From 6dab11742aa9965e8aa77160d9737ed30687cc4c Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Thu, 16 Apr 2020 11:03:30 -0400 Subject: [PATCH 32/33] MultiLoop, Folder, File, List samples --- .../Folder File and List Sample.xml | 112 ++++++++++++++++++ taskt/Sample Scripts/Multi Loop Sample.xml | 105 ++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 taskt/Sample Scripts/Folder File and List Sample.xml create mode 100644 taskt/Sample Scripts/Multi Loop Sample.xml diff --git a/taskt/Sample Scripts/Folder File and List Sample.xml b/taskt/Sample Scripts/Folder File and List Sample.xml new file mode 100644 index 000000000..cfa68ae06 --- /dev/null +++ b/taskt/Sample Scripts/Folder File and List Sample.xml @@ -0,0 +1,112 @@ + + \ No newline at end of file diff --git a/taskt/Sample Scripts/Multi Loop Sample.xml b/taskt/Sample Scripts/Multi Loop Sample.xml new file mode 100644 index 000000000..8ff133ffb --- /dev/null +++ b/taskt/Sample Scripts/Multi Loop Sample.xml @@ -0,0 +1,105 @@ + + \ No newline at end of file From 83b8e51b48cdf36bab0c0071a74e1ded826feb39 Mon Sep 17 00:00:00 2001 From: Francesca Faerman Date: Thu, 16 Apr 2020 11:40:06 -0400 Subject: [PATCH 33/33] Fixed a lot of metadata --- .../Automation/Commands/ExcelActivateSheetCommand.cs | 2 +- .../Automation/Commands/ExcelAddWorkbookCommand.cs | 2 +- .../Core/Automation/Commands/ExcelAppendCellCommand.cs | 2 +- .../Core/Automation/Commands/ExcelAppendRowCommand.cs | 4 ++-- .../Commands/ExcelCloseApplicationCommand.cs | 2 +- .../Core/Automation/Commands/ExcelDeleteCellCommand.cs | 2 +- .../Core/Automation/Commands/ExcelDeleteRowCommand.cs | 2 +- taskt/Core/Automation/Commands/ExcelGetCellCommand.cs | 2 +- .../Core/Automation/Commands/ExcelGetLastRowCommand.cs | 2 +- .../Core/Automation/Commands/ExcelGetRangeCommand .cs | 2 +- .../Automation/Commands/ExcelGetRangeCommandASDT.cs | 2 +- taskt/Core/Automation/Commands/ExcelGoToCellCommand.cs | 2 +- .../Automation/Commands/ExcelOpenWorkbookCommand.cs | 2 +- taskt/Core/Automation/Commands/ExcelRunMacroCommand.cs | 2 +- taskt/Core/Automation/Commands/ExcelSaveAsCommand.cs | 2 +- taskt/Core/Automation/Commands/ExcelSaveCommand.cs | 2 +- taskt/Core/Automation/Commands/ExcelSetCellCommand.cs | 2 +- .../Commands/ExcelSplitRangeByColumnCommand.cs | 2 +- .../Core/Automation/Commands/ExcelWriteRangeCommand.cs | 4 ++-- taskt/Core/Automation/Commands/ExcelWriteRowCommand.cs | 10 +++++----- taskt/Core/Automation/Commands/GetDataRowCommand.cs | 4 ++-- .../Core/Automation/Commands/GetDataRowValueCommand.cs | 4 ++-- taskt/Core/Automation/Commands/GetFilesCommand.cs | 4 ++-- taskt/Core/Automation/Commands/GetFoldersCommand.cs | 4 ++-- taskt/Core/Automation/Commands/GetListItemCommand.cs | 4 ++-- .../Core/Automation/Commands/WordAddDocumentCommand.cs | 2 +- .../Automation/Commands/WordAppendDataTableCommand.cs | 2 +- .../Core/Automation/Commands/WordAppendImageCommand.cs | 2 +- .../Core/Automation/Commands/WordAppendTextCommand.cs | 2 +- .../Automation/Commands/WordCloseApplicationCommand.cs | 2 +- .../Core/Automation/Commands/WordExportToPDFCommand.cs | 2 +- .../Automation/Commands/WordOpenDocumentCommand.cs | 2 +- .../Automation/Commands/WordReadDocumentCommand.cs | 2 +- .../Core/Automation/Commands/WordReplaceTextCommand.cs | 2 +- taskt/Core/Automation/Commands/WordSaveAsCommand.cs | 2 +- taskt/Core/Automation/Commands/WordSaveCommand.cs | 2 +- .../Automation/Commands/WriteDataRowValueCommand.cs | 6 +++--- taskt/Core/Automation/Commands/WriteTextFileCommand.cs | 1 + 38 files changed, 51 insertions(+), 50 deletions(-) diff --git a/taskt/Core/Automation/Commands/ExcelActivateSheetCommand.cs b/taskt/Core/Automation/Commands/ExcelActivateSheetCommand.cs index 684ada0b9..8249343d8 100644 --- a/taskt/Core/Automation/Commands/ExcelActivateSheetCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelActivateSheetCommand.cs @@ -17,7 +17,7 @@ public class ExcelActivateSheetCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelAddWorkbookCommand.cs b/taskt/Core/Automation/Commands/ExcelAddWorkbookCommand.cs index c293c265d..d2a060c27 100644 --- a/taskt/Core/Automation/Commands/ExcelAddWorkbookCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelAddWorkbookCommand.cs @@ -17,7 +17,7 @@ public class ExcelAddWorkbookCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelAppendCellCommand.cs b/taskt/Core/Automation/Commands/ExcelAppendCellCommand.cs index 92b0d0d7d..3d5fa01c6 100644 --- a/taskt/Core/Automation/Commands/ExcelAppendCellCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelAppendCellCommand.cs @@ -18,7 +18,7 @@ public class ExcelAppendCellCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelAppendRowCommand.cs b/taskt/Core/Automation/Commands/ExcelAppendRowCommand.cs index 5758534a0..bff26510e 100644 --- a/taskt/Core/Automation/Commands/ExcelAppendRowCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelAppendRowCommand.cs @@ -18,12 +18,12 @@ public class ExcelAppendRowCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } [XmlAttribute] - [Attributes.PropertyAttributes.PropertyDescription("Please Enter text to set")] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the Row to set")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] [Attributes.PropertyAttributes.InputSpecification("Enter the text value that will be set (This could be a DataRow).")] [Attributes.PropertyAttributes.SampleUsage("Hello,world or [vText]")] diff --git a/taskt/Core/Automation/Commands/ExcelCloseApplicationCommand.cs b/taskt/Core/Automation/Commands/ExcelCloseApplicationCommand.cs index 918ec38a8..aca962bd1 100644 --- a/taskt/Core/Automation/Commands/ExcelCloseApplicationCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelCloseApplicationCommand.cs @@ -17,7 +17,7 @@ public class ExcelCloseApplicationCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelDeleteCellCommand.cs b/taskt/Core/Automation/Commands/ExcelDeleteCellCommand.cs index 91e78cc9e..347a08926 100644 --- a/taskt/Core/Automation/Commands/ExcelDeleteCellCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelDeleteCellCommand.cs @@ -17,7 +17,7 @@ public class ExcelDeleteCellCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelDeleteRowCommand.cs b/taskt/Core/Automation/Commands/ExcelDeleteRowCommand.cs index 59596a13c..d67b190f0 100644 --- a/taskt/Core/Automation/Commands/ExcelDeleteRowCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelDeleteRowCommand.cs @@ -17,7 +17,7 @@ public class ExcelDeleteRowCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelGetCellCommand.cs b/taskt/Core/Automation/Commands/ExcelGetCellCommand.cs index 5720ad5b0..37d09773a 100644 --- a/taskt/Core/Automation/Commands/ExcelGetCellCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelGetCellCommand.cs @@ -17,7 +17,7 @@ public class ExcelGetCellCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelGetLastRowCommand.cs b/taskt/Core/Automation/Commands/ExcelGetLastRowCommand.cs index c56859115..2d9115b3f 100644 --- a/taskt/Core/Automation/Commands/ExcelGetLastRowCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelGetLastRowCommand.cs @@ -17,7 +17,7 @@ public class ExcelGetLastRowCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelGetRangeCommand .cs b/taskt/Core/Automation/Commands/ExcelGetRangeCommand .cs index 21265e6f1..d9d15e5a3 100644 --- a/taskt/Core/Automation/Commands/ExcelGetRangeCommand .cs +++ b/taskt/Core/Automation/Commands/ExcelGetRangeCommand .cs @@ -17,7 +17,7 @@ public class ExcelGetRangeCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelGetRangeCommandASDT.cs b/taskt/Core/Automation/Commands/ExcelGetRangeCommandASDT.cs index d4f7fbe99..c19914777 100644 --- a/taskt/Core/Automation/Commands/ExcelGetRangeCommandASDT.cs +++ b/taskt/Core/Automation/Commands/ExcelGetRangeCommandASDT.cs @@ -20,7 +20,7 @@ public class ExcelGetRangeCommandAsDT : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelGoToCellCommand.cs b/taskt/Core/Automation/Commands/ExcelGoToCellCommand.cs index 5af5950da..a2aa07d3a 100644 --- a/taskt/Core/Automation/Commands/ExcelGoToCellCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelGoToCellCommand.cs @@ -17,7 +17,7 @@ public class ExcelGoToCellCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelOpenWorkbookCommand.cs b/taskt/Core/Automation/Commands/ExcelOpenWorkbookCommand.cs index d3e0eba7d..b5897ae69 100644 --- a/taskt/Core/Automation/Commands/ExcelOpenWorkbookCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelOpenWorkbookCommand.cs @@ -17,7 +17,7 @@ public class ExcelOpenWorkbookCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelRunMacroCommand.cs b/taskt/Core/Automation/Commands/ExcelRunMacroCommand.cs index 5ddfa23d6..e4ef3ae62 100644 --- a/taskt/Core/Automation/Commands/ExcelRunMacroCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelRunMacroCommand.cs @@ -17,7 +17,7 @@ public class ExcelRunMacroCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelSaveAsCommand.cs b/taskt/Core/Automation/Commands/ExcelSaveAsCommand.cs index 9acc5bbad..cf66d0b47 100644 --- a/taskt/Core/Automation/Commands/ExcelSaveAsCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSaveAsCommand.cs @@ -17,7 +17,7 @@ public class ExcelSaveAsCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelSaveCommand.cs b/taskt/Core/Automation/Commands/ExcelSaveCommand.cs index 425b48647..1778b4544 100644 --- a/taskt/Core/Automation/Commands/ExcelSaveCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSaveCommand.cs @@ -17,7 +17,7 @@ public class ExcelSaveCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelSetCellCommand.cs b/taskt/Core/Automation/Commands/ExcelSetCellCommand.cs index 031249f42..3fe5bbc69 100644 --- a/taskt/Core/Automation/Commands/ExcelSetCellCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSetCellCommand.cs @@ -17,7 +17,7 @@ public class ExcelSetCellCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs index 722048292..89cdf9aca 100644 --- a/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelSplitRangeByColumnCommand.cs @@ -21,7 +21,7 @@ public class ExcelSplitRangeByColumnCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelWriteRangeCommand.cs b/taskt/Core/Automation/Commands/ExcelWriteRangeCommand.cs index 2d4d6bc36..e9fe9051b 100644 --- a/taskt/Core/Automation/Commands/ExcelWriteRangeCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelWriteRangeCommand.cs @@ -20,7 +20,7 @@ public class ExcelWriteRangeCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } @@ -43,7 +43,7 @@ public class ExcelWriteRangeCommand : ScriptCommand [Attributes.PropertyAttributes.PropertyDescription("Add Headers")] [Attributes.PropertyAttributes.PropertyUISelectionOption("Yes")] [Attributes.PropertyAttributes.PropertyUISelectionOption("No")] - [Attributes.PropertyAttributes.InputSpecification("When selected, the column headers from the specified spreadsheet range are also added.")] + [Attributes.PropertyAttributes.InputSpecification("When selected, the column headers from the specified spreadsheet range are also written.")] [Attributes.PropertyAttributes.SampleUsage("Select from **Yes** or **No**")] [Attributes.PropertyAttributes.Remarks("")] public string v_AddHeaders { get; set; } diff --git a/taskt/Core/Automation/Commands/ExcelWriteRowCommand.cs b/taskt/Core/Automation/Commands/ExcelWriteRowCommand.cs index 767b56dd8..331137780 100644 --- a/taskt/Core/Automation/Commands/ExcelWriteRowCommand.cs +++ b/taskt/Core/Automation/Commands/ExcelWriteRowCommand.cs @@ -12,7 +12,7 @@ namespace taskt.Core.Automation.Commands { [Serializable] [Attributes.ClassAttributes.Group("Excel Commands")] - [Attributes.ClassAttributes.Description("This command writes a datarow to an excel sheet starting from the given cell address.")] + [Attributes.ClassAttributes.Description("This command writes a DataRow to an excel sheet starting from the given cell address.")] [Attributes.ClassAttributes.UsesDescription("Use this command when you want to set a value to a specific cell.")] [Attributes.ClassAttributes.ImplementationDescription("This command implements Excel Interop to achieve automation.")] public class ExcelWriteRowCommand : ScriptCommand @@ -20,15 +20,15 @@ public class ExcelWriteRowCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Excel** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **excelInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Excel** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } [XmlAttribute] - [Attributes.PropertyAttributes.PropertyDescription("Please Enter the DataRow Variable Name to Set")] + [Attributes.PropertyAttributes.PropertyDescription("Please Enter the Row to Set")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] - [Attributes.PropertyAttributes.InputSpecification("Enter the text value that will be set.")] - [Attributes.PropertyAttributes.SampleUsage("Hello World or [vText]")] + [Attributes.PropertyAttributes.InputSpecification("Enter the text value that will be set (This could be a DataRow).")] + [Attributes.PropertyAttributes.SampleUsage("Hello,World or [vText]")] [Attributes.PropertyAttributes.Remarks("")] public string v_DataRowToSet { get; set; } [XmlAttribute] diff --git a/taskt/Core/Automation/Commands/GetDataRowCommand.cs b/taskt/Core/Automation/Commands/GetDataRowCommand.cs index 8eb96a081..6a9af04cd 100644 --- a/taskt/Core/Automation/Commands/GetDataRowCommand.cs +++ b/taskt/Core/Automation/Commands/GetDataRowCommand.cs @@ -11,7 +11,7 @@ namespace taskt.Core.Automation.Commands { [Serializable] [Attributes.ClassAttributes.Group("DataTable Commands")] - [Attributes.ClassAttributes.Description("This command allows you to get the DataRow count from a DataTable")] + [Attributes.ClassAttributes.Description("This command allows you to get a DataRow from a DataTable")] [Attributes.ClassAttributes.UsesDescription("Use this command when you want to add a datarow to a DataTable.")] [Attributes.ClassAttributes.ImplementationDescription("")] public class GetDataRowCommand : ScriptCommand @@ -19,7 +19,7 @@ public class GetDataRowCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the DataTable Name")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] - [Attributes.PropertyAttributes.InputSpecification("Enter a existing DataTable to add rows to.")] + [Attributes.PropertyAttributes.InputSpecification("Enter a existing DataTable to fet rows from.")] [Attributes.PropertyAttributes.SampleUsage("**myData**")] [Attributes.PropertyAttributes.Remarks("")] public string v_DataTableName { get; set; } diff --git a/taskt/Core/Automation/Commands/GetDataRowValueCommand.cs b/taskt/Core/Automation/Commands/GetDataRowValueCommand.cs index 4deef8099..bf9dcd7aa 100644 --- a/taskt/Core/Automation/Commands/GetDataRowValueCommand.cs +++ b/taskt/Core/Automation/Commands/GetDataRowValueCommand.cs @@ -19,7 +19,7 @@ public class GetDataRowValueCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the DataRow Name")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] - [Attributes.PropertyAttributes.InputSpecification("Enter a existing DataTable to add rows to.")] + [Attributes.PropertyAttributes.InputSpecification("Enter a existing DataRow to get Values from.")] [Attributes.PropertyAttributes.SampleUsage("**myData**")] [Attributes.PropertyAttributes.Remarks("")] public string v_DataRowName { get; set; } @@ -34,7 +34,7 @@ public class GetDataRowValueCommand : ScriptCommand public string v_Option { get; set; } [XmlAttribute] - [Attributes.PropertyAttributes.PropertyDescription("Please enter the index of the DataRow")] + [Attributes.PropertyAttributes.PropertyDescription("Please enter the index of the DataRow Value")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] [Attributes.PropertyAttributes.InputSpecification("Enter a valid DataRow index value")] [Attributes.PropertyAttributes.SampleUsage("0 or [vIndex]")] diff --git a/taskt/Core/Automation/Commands/GetFilesCommand.cs b/taskt/Core/Automation/Commands/GetFilesCommand.cs index 74d9fb5c1..d0ef0528c 100644 --- a/taskt/Core/Automation/Commands/GetFilesCommand.cs +++ b/taskt/Core/Automation/Commands/GetFilesCommand.cs @@ -11,9 +11,9 @@ namespace taskt.Core.Automation.Commands [Serializable] [Attributes.ClassAttributes.Group("File Operation Commands")] - [Attributes.ClassAttributes.Description("This command returns a list of file paths from a specified destination")] + [Attributes.ClassAttributes.Description("This command returns a list of file paths from a specified location")] [Attributes.ClassAttributes.UsesDescription("Use this command to return a list of file paths from a specific location.")] - [Attributes.ClassAttributes.ImplementationDescription("This command implements '' to achieve automation.")] + [Attributes.ClassAttributes.ImplementationDescription("")] public class GetFilesCommand : ScriptCommand { [XmlAttribute] diff --git a/taskt/Core/Automation/Commands/GetFoldersCommand.cs b/taskt/Core/Automation/Commands/GetFoldersCommand.cs index d9f58e6c6..cc3570c1d 100644 --- a/taskt/Core/Automation/Commands/GetFoldersCommand.cs +++ b/taskt/Core/Automation/Commands/GetFoldersCommand.cs @@ -11,9 +11,9 @@ namespace taskt.Core.Automation.Commands [Serializable] [Attributes.ClassAttributes.Group("Folder Operation Commands")] - [Attributes.ClassAttributes.Description("This command returns a list of folder directories from a specified destination")] + [Attributes.ClassAttributes.Description("This command returns a list of folder directories from a specified location")] [Attributes.ClassAttributes.UsesDescription("Use this command to return a list of folder directories from a specific location.")] - [Attributes.ClassAttributes.ImplementationDescription("This command implements '' to achieve automation.")] + [Attributes.ClassAttributes.ImplementationDescription("")] public class GetFoldersCommand : ScriptCommand { [XmlAttribute] diff --git a/taskt/Core/Automation/Commands/GetListItemCommand.cs b/taskt/Core/Automation/Commands/GetListItemCommand.cs index c3b36318e..8e4bd1b23 100644 --- a/taskt/Core/Automation/Commands/GetListItemCommand.cs +++ b/taskt/Core/Automation/Commands/GetListItemCommand.cs @@ -12,8 +12,8 @@ namespace taskt.Core.Automation.Commands { [Serializable] [Attributes.ClassAttributes.Group("Data Commands")] - [Attributes.ClassAttributes.Description("This command allows you to get the item count of a List")] - [Attributes.ClassAttributes.UsesDescription("Use this command when you want to get the item count of a List.")] + [Attributes.ClassAttributes.Description("This command allows you to get an item from a List")] + [Attributes.ClassAttributes.UsesDescription("Use this command when you want to get an item from a List.")] [Attributes.ClassAttributes.ImplementationDescription("")] public class GetListItemCommand : ScriptCommand { diff --git a/taskt/Core/Automation/Commands/WordAddDocumentCommand.cs b/taskt/Core/Automation/Commands/WordAddDocumentCommand.cs index eafbe6abf..186b20292 100644 --- a/taskt/Core/Automation/Commands/WordAddDocumentCommand.cs +++ b/taskt/Core/Automation/Commands/WordAddDocumentCommand.cs @@ -17,7 +17,7 @@ public class WordAddDocumentCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordAppendDataTableCommand.cs b/taskt/Core/Automation/Commands/WordAppendDataTableCommand.cs index 67ba98dee..fbe41f341 100644 --- a/taskt/Core/Automation/Commands/WordAppendDataTableCommand.cs +++ b/taskt/Core/Automation/Commands/WordAppendDataTableCommand.cs @@ -21,7 +21,7 @@ public class WordAppendDataTableCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordAppendImageCommand.cs b/taskt/Core/Automation/Commands/WordAppendImageCommand.cs index 81a76273c..fdf8bcb39 100644 --- a/taskt/Core/Automation/Commands/WordAppendImageCommand.cs +++ b/taskt/Core/Automation/Commands/WordAppendImageCommand.cs @@ -21,7 +21,7 @@ public class WordAppendImageCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordAppendTextCommand.cs b/taskt/Core/Automation/Commands/WordAppendTextCommand.cs index 584dc78fb..12618cc71 100644 --- a/taskt/Core/Automation/Commands/WordAppendTextCommand.cs +++ b/taskt/Core/Automation/Commands/WordAppendTextCommand.cs @@ -21,7 +21,7 @@ public class WordAppendTextCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordCloseApplicationCommand.cs b/taskt/Core/Automation/Commands/WordCloseApplicationCommand.cs index 74989ab08..cbec7c18a 100644 --- a/taskt/Core/Automation/Commands/WordCloseApplicationCommand.cs +++ b/taskt/Core/Automation/Commands/WordCloseApplicationCommand.cs @@ -17,7 +17,7 @@ public class WordCloseApplicationCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordExportToPDFCommand.cs b/taskt/Core/Automation/Commands/WordExportToPDFCommand.cs index bf010c41a..f6afdd427 100644 --- a/taskt/Core/Automation/Commands/WordExportToPDFCommand.cs +++ b/taskt/Core/Automation/Commands/WordExportToPDFCommand.cs @@ -18,7 +18,7 @@ public class WordExportToPDFCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordOpenDocumentCommand.cs b/taskt/Core/Automation/Commands/WordOpenDocumentCommand.cs index 6e0f29b43..bd05744e7 100644 --- a/taskt/Core/Automation/Commands/WordOpenDocumentCommand.cs +++ b/taskt/Core/Automation/Commands/WordOpenDocumentCommand.cs @@ -17,7 +17,7 @@ public class WordOpenDocumentCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordReadDocumentCommand.cs b/taskt/Core/Automation/Commands/WordReadDocumentCommand.cs index 5658192ab..e000aba19 100644 --- a/taskt/Core/Automation/Commands/WordReadDocumentCommand.cs +++ b/taskt/Core/Automation/Commands/WordReadDocumentCommand.cs @@ -18,7 +18,7 @@ public class WordReadDocumentCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordReplaceTextCommand.cs b/taskt/Core/Automation/Commands/WordReplaceTextCommand.cs index 3efaa5f41..082cc9cbb 100644 --- a/taskt/Core/Automation/Commands/WordReplaceTextCommand.cs +++ b/taskt/Core/Automation/Commands/WordReplaceTextCommand.cs @@ -18,7 +18,7 @@ public class WordReplaceTextCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordSaveAsCommand.cs b/taskt/Core/Automation/Commands/WordSaveAsCommand.cs index d33716dfb..8d964b00f 100644 --- a/taskt/Core/Automation/Commands/WordSaveAsCommand.cs +++ b/taskt/Core/Automation/Commands/WordSaveAsCommand.cs @@ -18,7 +18,7 @@ public class WordSaveAsCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WordSaveCommand.cs b/taskt/Core/Automation/Commands/WordSaveCommand.cs index f0f5950cc..a66b0de92 100644 --- a/taskt/Core/Automation/Commands/WordSaveCommand.cs +++ b/taskt/Core/Automation/Commands/WordSaveCommand.cs @@ -17,7 +17,7 @@ public class WordSaveCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please Enter the instance name")] [Attributes.PropertyAttributes.InputSpecification("Enter the unique instance name that was specified in the **Create Word** command")] - [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **seleniumInstance**")] + [Attributes.PropertyAttributes.SampleUsage("**myInstance** or **wordInstance**")] [Attributes.PropertyAttributes.Remarks("Failure to enter the correct instance name or failure to first call **Create Word** command will cause an error")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] public string v_InstanceName { get; set; } diff --git a/taskt/Core/Automation/Commands/WriteDataRowValueCommand.cs b/taskt/Core/Automation/Commands/WriteDataRowValueCommand.cs index ac6ad745e..f69ccb0f0 100644 --- a/taskt/Core/Automation/Commands/WriteDataRowValueCommand.cs +++ b/taskt/Core/Automation/Commands/WriteDataRowValueCommand.cs @@ -11,8 +11,8 @@ namespace taskt.Core.Automation.Commands { [Serializable] [Attributes.ClassAttributes.Group("DataTable Commands")] - [Attributes.ClassAttributes.Description("This command allows you to get a DataRow Value from a DataTable")] - [Attributes.ClassAttributes.UsesDescription("Use this command when you want to add a datarow to a DataTable.")] + [Attributes.ClassAttributes.Description("This command allows you to write a Value to a DataRow")] + [Attributes.ClassAttributes.UsesDescription("Use this command when you want to write a Value to a DataRow.")] [Attributes.ClassAttributes.ImplementationDescription("")] public class WriteDataRowValueCommand : ScriptCommand { @@ -34,7 +34,7 @@ public class WriteDataRowValueCommand : ScriptCommand public string v_Option { get; set; } [XmlAttribute] - [Attributes.PropertyAttributes.PropertyDescription("Please enter the index of the DataRow")] + [Attributes.PropertyAttributes.PropertyDescription("Please enter the index of the DataRow Value")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] [Attributes.PropertyAttributes.InputSpecification("Enter a valid DataRow index value")] [Attributes.PropertyAttributes.SampleUsage("0 or [vIndex]")] diff --git a/taskt/Core/Automation/Commands/WriteTextFileCommand.cs b/taskt/Core/Automation/Commands/WriteTextFileCommand.cs index ab0532f43..b7c497e0f 100644 --- a/taskt/Core/Automation/Commands/WriteTextFileCommand.cs +++ b/taskt/Core/Automation/Commands/WriteTextFileCommand.cs @@ -30,6 +30,7 @@ public class WriteTextFileCommand : ScriptCommand [XmlAttribute] [Attributes.PropertyAttributes.PropertyDescription("Please indicate the text to be written. [crLF] inserts a newline.")] [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper)] + [Attributes.PropertyAttributes.PropertyUIHelper(Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFolderSelectionHelper)] [Attributes.PropertyAttributes.InputSpecification("Indicate the text should be written to files.")] [Attributes.PropertyAttributes.SampleUsage("**[vText]** or **Hello World!**")] [Attributes.PropertyAttributes.Remarks("")]