I am playing with the Telerik Testing Framework to compare it to Selenium, so we can decide if we will use it or Selenium moving forward. So far it seems to work well, and I have my first simple test case working great with IE. However when I run it with Firefox it fails, because when I submit the form on a page it returns immediately to my test code, while Firefox is still processing the submit in the background. With IE it does not do this, and waits until the submit has finished, and the site has rendered the resulting next page (which is the result of a redirect; it is testing our login page).
The code for the simple test is as follows:
// Browse to the login page
// Enter the user name and password
>("UserName").Text = "UserName";
>("Password").Text = _strongPassword;
// Now submit the form
// Make sure we ended up on the categories page and the login succeeded
Assert.IsTrue(Browser.ContainsText("Categories / Products"));
The problem crops up with the Assert at the end. With IE, the test framework waits when the .Click() is done on the confirm button, and does not return until the resulting page has rendered. So then I can test for the content and it woks. With Firefox it returns immediately and the content in the browser is not correct since it has not yet changed, but the submit is being processed in the background.
I was trying to find out if there is a way to force it to wait after the submit to make it work with Firefox, but can't figure that out yet. But either way I think the test framework should be waiting on submit until the browser has settled and rendered the next page?