Skip to content

Commit

Permalink
[dotnet] implement a way to reset Action builder sequences after perf…
Browse files Browse the repository at this point in the history
…orm is called
  • Loading branch information
titusfortner committed May 27, 2022
1 parent 2259f63 commit 35bba6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions dotnet/src/webdriver/Interactions/ActionBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ public IList<ActionSequence> ToActionSequenceList()
return new List<ActionSequence>(this.sequences.Values).AsReadOnly();
}

/// <summary>
/// Resets the list of sequences.
/// </summary>
public void ClearSequences()
{
this.sequences = new Dictionary<InputDevice, ActionSequence>();
}

/// <summary>
/// Returns a string that represents the current <see cref="ActionBuilder"/>.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions dotnet/src/webdriver/Interactions/Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,7 @@ public IAction Build()
public void Perform()
{
this.actionExecutor.PerformActions(this.actionBuilder.ToActionSequenceList());
this.actionBuilder.ClearSequences();
}

/// <summary>
Expand Down

0 comments on commit 35bba6a

Please sign in to comment.