I'm trying to run a simple watiN example: search google then verify the search result. (on IE9)
var browser = new IE("http://www.google.com/ncr");
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.Button(Find.ByName("btnG")).Click();
Assert.True(browser.ContainsText("WatiN"));
This test fails! I don't know why, but adding a call to WaitUntilContainsText("Everything") make this pass:
var browser = new IE("http://www.google.com/ncr");
browser.TextField(Find.ByName("q")).TypeText("WatiN");
browser.WaitUntilContainsText("Everything");// because of google instant??
browser.Button(Find.ByName("btnG")).Click();
Assert.True(browser.ContainsText("WatiN"));
I guess this maybe because of the behavior of google instant but can't be sure. Can someone explain what's wrong with this test?