Frederico, let's imagine an Ajax form that calculates your age and the following test:
[WebTestMethod]
public void Can_Calculate_Age()
{
// Arrange
HtmlPage page = new HtmlPage("/AgeCalculator");
// Act
page.Elements.Find("currentYear").SetText("2010");
page.Elements.Find("yearOfBirth").SetText("1932");
page.Elements.Find("submitButton").Click();
// Assert
var resultsElement = page.Elements.Find("results");
resultsElement.WaitForInnerText("Your age is approximately: 78", ajaxRequestTimeoutSeconds);
}
As you can see, this test verifies that the result (in this case, presented in a div) is "Your age is approximately: 78".
What if this form is non-Ajax?
How do you wait for the result page to load and how do you find the url of that page?
By they way, is there any tools native to Visual Studio 2008 that is similar?
Can we record user experience with LTAF or that native tool I imagine as it is the case with the selenium plug-in for Firefox?
Thank you for taking the trouble to answer this questions!