Skip to content

Commit 5ea516d

Browse files
committed
Updating .NET VisibilityTest to handle new exception class hierarchy
1 parent 4364c1e commit 5ea516d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

dotnet/test/common/VisibilityTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public void ShouldNotBeAbleToClickOnAnElementThatIsNotDisplayed()
7777
{
7878
driver.Url = javascriptPage;
7979
IWebElement element = driver.FindElement(By.Id("unclickable"));
80-
Assert.Throws<ElementNotVisibleException>(() => element.Click());
80+
Assert.Throws<ElementNotInteractableException>(() => element.Click());
8181
}
8282

8383
[Test]
@@ -86,7 +86,7 @@ public void ShouldNotBeAbleToTypeAnElementThatIsNotDisplayed()
8686
{
8787
driver.Url = javascriptPage;
8888
IWebElement element = driver.FindElement(By.Id("unclickable"));
89-
Assert.Throws<ElementNotVisibleException>(() => element.SendKeys("You don't see me"));
89+
Assert.Throws<ElementNotInteractableException>(() => element.SendKeys("You don't see me"));
9090

9191
Assert.AreNotEqual(element.GetAttribute("value"), "You don't see me");
9292
}
@@ -97,7 +97,7 @@ public void ShouldNotBeAbleToSelectAnElementThatIsNotDisplayed()
9797
{
9898
driver.Url = javascriptPage;
9999
IWebElement element = driver.FindElement(By.Id("untogglable"));
100-
Assert.Throws<ElementNotVisibleException>(() => element.Click());
100+
Assert.Throws<ElementNotInteractableException>(() => element.Click());
101101
}
102102

103103
[Test]

0 commit comments

Comments
 (0)