Skip to content

Commit a4ab3d5

Browse files
committed
InstanceOf -> TypeOf
1 parent ef6e1ab commit a4ab3d5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

dotnet/test/common/AlertsTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public void SettingTheValueOfAnAlertThrows()
154154
{
155155
Assert.That(
156156
() => alert.SendKeys("cheese"),
157-
Throws.InstanceOf<ElementNotInteractableException>());
157+
Throws.TypeOf<ElementNotInteractableException>());
158158
}
159159
finally
160160
{
@@ -202,7 +202,7 @@ public void AlertShouldNotAllowAdditionalCommandsIfDismissed()
202202

203203
Assert.That(
204204
() => alert.Text,
205-
Throws.InstanceOf<NoAlertPresentException>());
205+
Throws.TypeOf<NoAlertPresentException>());
206206
}
207207

208208
[Test]
@@ -254,7 +254,7 @@ public void SwitchingToMissingAlertThrows()
254254

255255
Assert.That(
256256
AlertToBePresent,
257-
Throws.InstanceOf<NoAlertPresentException>());
257+
Throws.TypeOf<NoAlertPresentException>());
258258
}
259259

260260
[Test]
@@ -277,7 +277,7 @@ public void SwitchingToMissingAlertInAClosedWindowThrows()
277277

278278
Assert.That(
279279
() => AlertToBePresent().Accept(),
280-
Throws.InstanceOf<NoSuchWindowException>());
280+
Throws.TypeOf<NoSuchWindowException>());
281281

282282
}
283283
finally
@@ -420,7 +420,7 @@ public void ShouldNotHandleAlertInAnotherWindow()
420420
IWebElement el = driver.FindElement(By.Id("open-new-window"));
421421
WaitFor<IAlert>(AlertToBePresent, TimeSpan.FromSeconds(5), "No alert found");
422422
},
423-
Throws.InstanceOf<WebDriverException>());
423+
Throws.TypeOf<WebDriverException>());
424424

425425
}
426426
finally
@@ -444,7 +444,7 @@ public void IncludesAlertTextInUnhandledAlertException()
444444

445445
Assert.That(
446446
() => driver.Title,
447-
Throws.InstanceOf<UnhandledAlertException>().With.Property(nameof(UnhandledAlertException.AlertText)).EqualTo("cheese"));
447+
Throws.TypeOf<UnhandledAlertException>().With.Property(nameof(UnhandledAlertException.AlertText)).EqualTo("cheese"));
448448
}
449449

450450
[Test]

0 commit comments

Comments
 (0)