Skip to content

Commit

Permalink
Changing .NET interactions tests to reset input state before test
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Apr 14, 2017
1 parent b074f20 commit 6692b19
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dotnet/test/common/Interactions/BasicMouseInterfaceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,24 @@
using NUnit.Framework;
using System.Text.RegularExpressions;
using System.Drawing;
using OpenQA.Selenium.Internal;

namespace OpenQA.Selenium.Interactions
{
[TestFixture]
[IgnoreBrowser(Browser.Safari, "Not implemented (issue 4136)")]
public class BasicMouseInterfaceTest : DriverTestFixture
{
[SetUp]
public void SetupTest()
{
IActionExecutor actionExecutor = driver as IActionExecutor;
if (actionExecutor != null)
{
actionExecutor.ResetInputState();
}
}

[Test]
[IgnoreBrowser(Browser.IPhone, "API not implemented in driver")]
[IgnoreBrowser(Browser.Android, "API not implemented in driver")]
Expand Down
11 changes: 11 additions & 0 deletions dotnet/test/common/Interactions/CombinedInputActionsTest.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using NUnit.Framework;
using OpenQA.Selenium.Internal;
using System.Collections.ObjectModel;

namespace OpenQA.Selenium.Interactions
Expand All @@ -10,12 +11,22 @@ public class CombinedInputActionsTest : DriverTestFixture
public void Setup()
{
new Actions(driver).SendKeys(Keys.Null).Perform();
IActionExecutor actionExecutor = driver as IActionExecutor;
if (actionExecutor != null)
{
actionExecutor.ResetInputState();
}
}

[TearDown]
public void ReleaseModifierKeys()
{
new Actions(driver).SendKeys(Keys.Null).Perform();
IActionExecutor actionExecutor = driver as IActionExecutor;
if (actionExecutor != null)
{
actionExecutor.ResetInputState();
}
}

[Test]
Expand Down
11 changes: 11 additions & 0 deletions dotnet/test/common/Interactions/DragAndDropTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,23 @@
using System.Drawing;
using System.Text.RegularExpressions;
using OpenQA.Selenium.Environment;
using OpenQA.Selenium.Internal;

namespace OpenQA.Selenium.Interactions
{
[TestFixture]
public class DragAndDropTest : DriverTestFixture
{
[SetUp]
public void SetupTest()
{
IActionExecutor actionExecutor = driver as IActionExecutor;
if (actionExecutor != null)
{
actionExecutor.ResetInputState();
}
}

[Test]
[Category("Javascript")]
[IgnoreBrowser(Browser.HtmlUnit)]
Expand Down

0 comments on commit 6692b19

Please sign in to comment.