title: Get URL from chrome to C# not working
body: <p><strong>-I found this solution:</strong></p>
  
  <pre><code>    static void Main(string[] args)
      {
          foreach (Process process in Process.GetProcessesByName("chrome"))
          {
              string url = GetChromeUrl(process);
              if (url == null)
                  continue;
  
              Console.WriteLine("CH Url for '" + process.MainWindowTitle + "' is " + url);
          }
      }
     public static string GetChromeUrl(Process process)
     {
         if (process == null)
             throw new ArgumentNullException("process");
  
         if (process.MainWindowHandle == IntPtr.Zero)
             return null;
  
         AutomationElement element = AutomationElement.FromHandle(process.MainWindowHandle);
         if (element == null)
             return null;
  
         AutomationElement edit = element.FindFirst(TreeScope.Children, new PropertyCondition(AutomationElement.ControlTypeProperty, ControlType.Edit));
         return ((ValuePattern)edit.GetCurrentPattern(ValuePattern.Pattern)).Current.Value as string;
     }
  </code></pre>
  
  <ul>
  <li>but in is not working in last chrome version (32.0.1700.102 m). Can somebody tell more common solution?</li>
  <li>Chrome has probably changed something, and above walking needs to be modified. :(</li>
  <li>Thanks in Advance.</li>
  </ul>