Skip to content

Commit

Permalink
Properly ignoring .NET DevTools tests for non-DevTools browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
jimevans committed Jul 10, 2019
1 parent c346167 commit 5304b39
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions dotnet/test/common/DevTools/DevToolsTestFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,15 @@ public bool IsDevToolsSupported
[SetUp]
public void Setup()
{
driver = EnvironmentManager.Instance.CreateFreshDriver();
driver = EnvironmentManager.Instance.GetCurrentDriver();
devTools = driver as IDevTools;
if (devTools != null)
if (devTools == null)
{
session = devTools.CreateDevToolsSession();
Assert.Ignore("{0} does not support Chrome DevTools Protocol", EnvironmentManager.Instance.Browser);
return;
}

session = devTools.CreateDevToolsSession();
}

[TearDown]
Expand All @@ -35,10 +38,9 @@ public void Teardown()
if (session != null)
{
session.Dispose();
EnvironmentManager.Instance.CloseCurrentDriver();
driver = null;
}

EnvironmentManager.Instance.CloseCurrentDriver();
driver = null;
}
}
}

0 comments on commit 5304b39

Please sign in to comment.