public void ProcessesContentWithMixedCaseTagNamesAcrossStartAndEndTagsTest() { const string Html = @" <html> <body> <FORm id='test'></foRM> </body> </html> "; using (var content = StreamContentFactory.FromHtml(Html)) { var page = new HtmlPageWrapper(); page.AssignContent(content); var actual = page.Find <AnyHtmlElement>().ByTagName("form"); actual.Id.Should().Be("test"); } }
public void ProcessesContentWithCaseInsensitiveAttributeNamesTest() { const string Html = @" <html> <body> <FORm Name='test'></FORm> </body> </html> "; using (var content = StreamContentFactory.FromHtml(Html)) { var page = new HtmlPageWrapper(); page.AssignContent(content); var actual = page.Find <AnyHtmlElement>().AllByAttribute("name", "test"); actual.Count().Should().Be(1); } }
public void ProcessesContentWithCaseInsensitiveAttributeValuesTest() { const string Html = @" <html> <body> <form name='test'> <input type='Submit' name='Login' value='Submit' /> </form> </body> </html> "; using (var content = StreamContentFactory.FromHtml(Html)) { var page = new HtmlPageWrapper(); page.AssignContent(content); var actual = page.Find <HtmlButton>().ByName("login"); actual.Value.Should().Be("Submit"); } }