title: UiObject clickAndWaitForNewWindow takes too long to load
body: <p>In our uiautomator test cases we use UiObject.clickAndWaitForNewWindow to trigger any clicking action. However sometimes it just simply takes too long for device to response / load the page. Thus before the page is completely loaded any follow-up analysis / test fails as the expected widgets are not ready yet. This fails some of our test cases in an undetermined way. Most of time simply rerunning the test cases they pass.</p>
  
  <p>Is there any way to make sure UiObject.clickAndWaitForNewWindow loads the expected page completely before continuing on next verification? We can insert a sleep statement right after UiObject.clickAndWaitForNewWindow, which works as double-edge sword, but that does not really solve this problem.</p>
  
  <pre><code>UiObject.clickAndWaitForNewWindow();
  // how to wait until the page is loaded completely
  new UiSelector(...); // search for widgets that are supposed to be on the newly loaded page
  </code></pre>