ValidationRuleRequiredAttributeValue not working for me

2 views
Skip to first unread message

Moskie

unread,
Aug 8, 2007, 5:30:30 PM8/8/07
to TestDriven.NET Users
I have a test that makes use of the following rule

ValidationRuleRequiredAttributeValue rule6 = new
ValidationRuleRequiredAttributeValue();
rule6.TagName = "a";
rule6.AttributeName = "href";
rule6.MatchAttributeName = "";
rule6.MatchAttributeValue = "";
rule6.ExpectedValue = "../" + LinkUrl;
rule6.IgnoreCase = true;
request7.ValidateResponse += new
EventHandler<ValidationEventArgs>(rule6.Validate);

LinkUrl is a property I have declared. The test fails with this
message:

"No HTML tag named 'a' contained an attribute named 'href' with the
expected value '../test54ae04c5-3d9d-477e-b8b5-881e936aa892/
index.aspx'."

However, the response *does* contain it. In the test results, the
response tab shows this within the HTML:

<a href="../test54ae04c5-3d9d-477e-b8b5-881e936aa892/index.aspx">


Why did this test fail?

Reply all
Reply to author
Forward
0 new messages