From 8d2ec033fbaa7f078b70794828a1d00a59309685 Mon Sep 17 00:00:00 2001 From: YevgeniyShunevych Date: Thu, 17 May 2018 11:32:06 +0300 Subject: [PATCH] #178 Add PerformActions method to PageObject --- src/Atata/Components/PageObject`1.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/Atata/Components/PageObject`1.cs b/src/Atata/Components/PageObject`1.cs index 61125d7a..8285c972 100644 --- a/src/Atata/Components/PageObject`1.cs +++ b/src/Atata/Components/PageObject`1.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Threading; using OpenQA.Selenium; +using OpenQA.Selenium.Interactions; namespace Atata { @@ -412,6 +413,18 @@ public TOwner Press(string keys) return (TOwner)this; } + /// + /// Performs the specified set of actions. + /// + /// The actions builder. + /// The instance of this page object. + public TOwner PerformActions(Func actionsBuilder) + { + Driver.Perform(actionsBuilder); + + return (TOwner)this; + } + /// /// Waits the specified time. ///