title: Is there a way to get the URL of a site opened in a browser in app mode using Microsoft's UI Automation API?
body: <p>Using the Windows Automation UI (System.Windows.Automation) in C# I can get the URL from a browser window:</p>
  <pre class="lang-cs prettyprint-override"><code>return parent?.FindFirst
  (
    TreeScope.Descendants,
    new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit)
  );
  </code></pre>
  <p>However, if the website is opened by the browser in &quot;app mode&quot; (Chrome) this fails because the URL bar is hidden. Is there a way to get the URL of a site using MS UI Automation when the URL bar is hidden?</p>
  <p>To open a URL in Chrome in app mode see: <a href="https://superuser.com/questions/33548/starting-google-chrome-in-application-mode">https://superuser.com/questions/33548/starting-google-chrome-in-application-mode</a></p>