Skip to content

Commit b1b7dcd

Browse files
committed
Another attempt to ignore unwanted exceptions
1 parent 27e2dd8 commit b1b7dcd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

CSF.Extensions.WebDriver.Tests/Factories/WebDriverFromOptionsFactoryTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public void GetWebDriverShouldCreateALocalChromeDriverFromAppropriateOptions([St
2626
{
2727
Assert.Pass("Despite the exception raised, this is only because the driver isn't installed on the environment running the test; this is more than enough to prove that the driver was being created.");
2828
}
29-
catch(TargetInvocationException e) when (e is { InnerException: InvalidOperationException } invOpEx)
29+
catch(TargetInvocationException e) when (e is { InnerException: InvalidOperationException })
3030
{
31-
if(invOpEx.Message.StartsWith("session not created:"))
31+
if(e.InnerException.Message.StartsWith("session not created:"))
3232
Assert.Pass("Despite the exception raised, this is only because the wrong version of the driver is installed on the environment running the test; this is more than enough to prove that the driver was being created.");
3333
else
3434
throw;

0 commit comments

Comments
 (0)