title: VS2015 Coded UI Cross Browser with Chrome error "Value cannot be null"
body: <p>When running a Coded UI test against Chrome, the cross browser console appears and the chrome browser pops up (but does not display web page), but then I get an exception: </p>
  
  <blockquote>
    <p><strong>System.ArgumentNullException: Value cannot be null. Parameter name: windowHandle</strong>  Test method
    SFS.Test.CodedUI.Learner.TestCases.CodedUITest1.CodedUITestMethod1
    threw exception:  System.ArgumentNullException: Value cannot be null.
    Parameter name: windowHandle
        at Microsoft.VisualStudio.TestTools.UITesting.UITestControl..ctor(IntPtr
    windowHandle)    at
    Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.InitializeTopLevelWindow()
    at
    Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.InitializeCrossBrowserService(String[]
    args)    at
    Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.&lt;>c.&lt;.cctor>b__3_0(String[]
    args)    at
    Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserService.Launch(Uri
    uri)    at
    Microsoft.VisualStudio.TestTools.UITest.Extension.CrossBrowser.CrossBrowserFactory.Launch(Uri
    uri)    at
    Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.LaunchPrivate(Uri
    uri)    at
    Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.&lt;>c__DisplayClass2_0.b__0()
    at
    Microsoft.VisualStudio.TestTools.UITesting.CodedUITestMethodInvoker.InvokeMethod[T](Func`1
    function, UITestControl control, Boolean firePlaybackErrorEvent,
    Boolean logAsAction)    at
    Microsoft.VisualStudio.TestTools.UITesting.BrowserWindow.Launch(Uri
    uri)    at
    SFS.Test.CodedUI.Learner.TestCases.CodedUITest1.CodedUITestMethod1()
    in C:\Source\SFS
    2.0\AMS\16.2\SFS.Test.CodedUI\SFS.Test.CodedUI.Learner\TestCases\CodedUITest1.cs:line
    28</p>
  </blockquote>
  
  <p>Line 28 is the BrowserWindow.Launch statement in the code below.</p>
  
  <p>I followed these instructions for installing the Selenium components for Coded UI Cross Browser Testing.    </p>
  
  <p><a href="https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d" rel="nofollow">https://visualstudiogallery.msdn.microsoft.com/11cfc881-f8c9-4f96-b303-a2780156628d</a></p>
  
  <p>The coded UI test is simple:</p>
  
  <pre><code>[CodedUITest]
  public class CodedUITest1
  {
  
      [TestMethod]
      public void CodedUITestMethod1()
      {
          BrowserWindow.CurrentBrowser = "chrome";
  
          var bw = BrowserWindow.Launch(new System.Uri("http://www.google.com"));
  
          var browser = new BrowserWindow();
          browser.CopyFrom(bw);
  
      }
  
  }
  </code></pre>
  
  <p>I read lots of people having success with these tools, so I am thinking it might be an issue with versions.  My versions are as follows:</p>
  
  <ul>
  <li>VS2015 Update 1  14.0.24720.000</li>
  <li>chromedriver version June 4, 2016</li>
  <li>Selenium Browser Components version 2.43.1.0</li>
  <li>Google Chrome 52.0.2743.116</li>
  </ul>
  
  <p>Do any of you have it working with VS2015? Can you tell me what versions of chromedriver, chrome and selenium browser components you are using?</p>