Skip to content

Commit

Permalink
Merge pull request saucepleez#12 from saucepleez/development-branch
Browse files Browse the repository at this point in the history
Added Clear Element to Web Browser Set Text Command
  • Loading branch information
saucepleez authored Aug 8, 2018
2 parents 5c9b3d4 + b9a8450 commit 55c545a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
16 changes: 16 additions & 0 deletions taskt/Core/AutomationCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -995,6 +995,22 @@ where rw.Field<string>("Parameter Name") == "Y Adjustment"
where rw.Field<string>("Parameter Name") == "Text To Set"
select rw.Field<string>("Parameter Value")).FirstOrDefault();


string clearElement = (from rw in v_WebActionParameterTable.AsEnumerable()
where rw.Field<string>("Parameter Name") == "Clear Element Before Setting Text"
select rw.Field<string>("Parameter Value")).FirstOrDefault();

if (clearElement == null)
{
clearElement = "No";
}

if (clearElement == "Yes")
{
element.Clear();
}


string[] potentialKeyPresses = textToSet.Split('{', '}');

Type seleniumKeys = typeof(OpenQA.Selenium.Keys);
Expand Down
2 changes: 1 addition & 1 deletion taskt/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("0.0.*")]
[assembly: AssemblyFileVersion("1.4.0.0")]
[assembly: AssemblyFileVersion("1.4.1.0")]
//[assembly: AssemblyVersion("0.0.0.2")]
//[assembly: AssemblyFileVersion("0.0.0.2")]
11 changes: 11 additions & 0 deletions taskt/UI/Forms/frmCommandEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,17 @@ private void seleniumAction_SelectionChangeCommitted(object sender, EventArgs e)
additionalParameterLabel.Show();
variableHelper.Show();
actionParameters.Rows.Add("Text To Set");
actionParameters.Rows.Add("Clear Element Before Setting Text");

DataGridViewComboBoxCell comparisonComboBox = new DataGridViewComboBoxCell();
comparisonComboBox.Items.Add("Yes");
comparisonComboBox.Items.Add("No");

//assign cell as a combobox
webActionParameterBox.Rows[1].Cells[1].Value = "No";
webActionParameterBox.Rows[1].Cells[1] = comparisonComboBox;


break;

case "Get Text":
Expand Down

0 comments on commit 55c545a

Please sign in to comment.