Skip to content

Commit

Permalink
[C#] Update tagName test searching for "" to throw
Browse files Browse the repository at this point in the history
  • Loading branch information
AutomatedTester committed Jan 20, 2016
1 parent 0b1d2ce commit 002c2b0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dotnet/test/common/ElementFindingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,14 @@ public void ShouldNotBeAbleToLocateByTagNameMultipleElementsThatDoNotExist()
public void FindingASingleElementByEmptyTagNameShouldThrow()
{
driver.Url = formsPage;
Assert.Throws<NoSuchElementException>(() => driver.FindElement(By.TagName("")));
Assert.Throws<InvalidSelectorException>(() => driver.FindElement(By.TagName("")));
}

[Test]
public void FindingMultipleElementsByEmptyTagNameShouldThrow()
{
driver.Url = formsPage;
ReadOnlyCollection<IWebElement> elements = driver.FindElements(By.TagName(""));
Assert.AreEqual(0, elements.Count);
Assert.Throws<InvalidSelectorException>(() => driver.FindElements(By.TagName("")));;
}

[Test]
Expand Down

0 comments on commit 002c2b0

Please sign in to comment.