diff --git a/dotnet/test/common/ElementFindingTest.cs b/dotnet/test/common/ElementFindingTest.cs index 336b1c546d047..86cb4d6e282c1 100644 --- a/dotnet/test/common/ElementFindingTest.cs +++ b/dotnet/test/common/ElementFindingTest.cs @@ -189,15 +189,14 @@ public void ShouldNotBeAbleToLocateByTagNameMultipleElementsThatDoNotExist() public void FindingASingleElementByEmptyTagNameShouldThrow() { driver.Url = formsPage; - Assert.Throws(() => driver.FindElement(By.TagName(""))); + Assert.Throws(() => driver.FindElement(By.TagName(""))); } [Test] public void FindingMultipleElementsByEmptyTagNameShouldThrow() { driver.Url = formsPage; - ReadOnlyCollection elements = driver.FindElements(By.TagName("")); - Assert.AreEqual(0, elements.Count); + Assert.Throws(() => driver.FindElements(By.TagName("")));; } [Test]