public void TestExistsNodeWithInvalidAttribute() { // Arrange const string contents = @"<html> <body> <span class='col'>test</span> </body> </html>"; var doc = new HtmlParser(contents); // Act var result = doc.ExistsNode("//span", "id"); // Arrange Assert.IsFalse(result); }
public void TestExistsNodeWithInvalidXPath() { // Arrange const string contents = @"<html> <body> <span>test</span> </body> </html>"; var doc = new HtmlParser(contents); // Act var result = doc.ExistsNode("//div", null); // Arrange Assert.IsFalse(result); }
public void TestExistsNode() { // Arrange const string contents = @"<html> <body> <span>test</span> </body> </html>"; var doc = new HtmlParser(contents); // Act var result = doc.ExistsNode("//span", null); // Arrange Assert.IsTrue(result); }