Last post Feb 13, 2009 03:19 AM by farmas
Feb 13, 2009 03:19 AM|farmas|LINK
I'll start moving some of the questions that we have gotten from our blog and code plex over to the forum so that they are easier to search.
Q: I'm having trouble finding a way to look at a ValidationSummary server side conrtol to see the errors that were added. I can find the control using HtmlPage.Elements.Find("") but how do I see the text/html?
A: Here is a sample test to verify the text of the validatiosummary:
HtmlPage p = new HtmlPage("Login.aspx");
string errorMessages = p.Elements.Find("ValidationSummary1").GetInnerTextRecursively();
Assert.StringContains(errorMessages, "Name is Required");
Assert.StringContains(errorMessages, "Password is Required");