Given a ProcessTestObject, is there a way to retrieve the window associated with that process as a BrowserTestObject or at least a TopLevelTestObject? E.g.
// Open IE at http://www.google.com/
ProcessTestObject browserProcess = startApp("Google");
// Wait for the browser to load...there's probably a better way, but I don't know it.
sleep(10);
// Now what?
The ProcessTestObject doesn't seem to have any children that I can use. I've tried
browserProcess.find(atDescendant(".class", "Html.HtmlBrowser"));
and
browserProcess.find(atDescendant(".class", "Html.HtmlDocument"));
but neither search yields any results. Trying to find specific HTML tags has failed as well.
I could search the RootTestObject for an HtmlBrowser and it'd probably work 98% of the time. However, I'd really prefer a way to guarantee that I'm grabbing the browser I just launched and not some stray window that may have been left open from a previous test. The only other alternative I can think of is to search for all browser windows and close them beforehand, but I figured there might be a simpler solution.