Let's say I have an automated test case that launches Google.com and searches for a string.
- Launch google.com
- Search "Malaysian Airline"
I have all the necessary properties for search field identified so that playback can find this very easy and run through it. But, when I run the test, it takes up to 10-14 seconds only to find the search field in Google.com and then searching in it.
My Code is
BrowserWindow browser = BrowserWindow.Launch("www.google.com");
UITestControl UISearch = new UITestControl(browser);
UISearch.TechnologyName = "Web";
UISearch.SearchProperties.Add("ControlType", "Edit");
UISearch.SearchProperties.Add("Id", "lst-ib");
Mouse.Click(UISearch);
Keyboard.SendKeys(UISearch, "Malaysian Airline");
You guys could also try it out. There are next to nothing else on Google.com still it takes too long to find the element where I have already given possible and the only unique Id.