Skip to content

Commit

Permalink
#178 Add PerformActions method to PageObject<TOwner>
Browse files Browse the repository at this point in the history
  • Loading branch information
YevgeniyShunevych committed May 17, 2018
1 parent 30a1e4d commit 8d2ec03
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Atata/Components/PageObject`1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Interactions;

namespace Atata
{
Expand Down Expand Up @@ -412,6 +413,18 @@ public TOwner Press(string keys)
return (TOwner)this;
}

/// <summary>
/// Performs the specified set of actions.
/// </summary>
/// <param name="actionsBuilder">The actions builder.</param>
/// <returns>The instance of this page object.</returns>
public TOwner PerformActions(Func<Actions, Actions> actionsBuilder)
{
Driver.Perform(actionsBuilder);

return (TOwner)this;
}

/// <summary>
/// Waits the specified time.
/// </summary>
Expand Down

0 comments on commit 8d2ec03

Please sign in to comment.