title: Selenium/Chromedriver automation hanging when run as executable
body: <p>I am trying to create a simple automation task. For now I want to log in to the webpage. This all works fine when I run the test in Visual Studio 2017. However this will need to be executed as an exe on regular interval in windows system. When I run the executable it hangs after displaying:</p>
  
  <blockquote>
    <p>Starting ChromeDriver 2.32.498550 (9dec58e66c31bcc53a9ce3c7226f0c1c5810906a)</p>
    
    <p>on port 9515</p>
    
    <p>Only local connections are allowed.</p>
  </blockquote>
  
  <p>I understand this is just info not an error per most SO posts related to this issue such as - <a href="https://stackoverflow.com/questions/25080500/when-running-webdriver-with-chrome-browser-getting-message-only-local-connect/25088200">When running WebDriver with Chrome browser, getting message, &quot;Only local connections are allowed&quot; even though browser launches properly</a>
  (note: my browser does not launch)</p>
  
  <p><strong>How do I run the test code as an executable?
  Do I have to write additional code to invoke the test when running as executable?</strong></p>
  
  <p><a href="https://i.stack.imgur.com/hUrLk.png" rel="nofollow noreferrer">Nuget Version Info</a></p>
  
  <pre class="lang-cs prettyprint-override"><code>namespace RevuSeleniumAutomation
  {
  using Microsoft.VisualStudio.TestTools.UnitTesting;
  using OpenQA.Selenium;
  using OpenQA.Selenium.Chrome;
  using OpenQA.Selenium.Firefox;
  using OpenQA.Selenium.IE;
  using OpenQA.Selenium.Remote;
  using OpenQA.Selenium.PhantomJS;
  using System;
  
  [TestClass]
  public class RevuAutomater
  {
      private string baseURL = "http://example.com/";
      private RemoteWebDriver driver;
      private string browser;
      public TestContext TestContext { get; set; }
  
      [TestMethod]
      [TestCategory("Selenium")]
      [Priority(1)]
      [Owner("Chrome")]
  
      public void AutomateSite()
      {
          driver = new ChromeDriver();
          driver.Manage().Window.Maximize();
          driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
          driver.Navigate().GoToUrl(this.baseURL);
          driver.FindElementById("UserName").SendKeys("user");
          driver.FindElementById("Password").SendKeys("12345");
      }
  
      [TestCleanup()]
      public void MyTestCleanup()
      {
          driver.Quit();
      }
  
      [TestInitialize()]
      public void MyTestInitialize()
      {
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p><a href="https://i.stack.imgur.com/Mlv8K.png" rel="nofollow noreferrer">The cmd window message after launching exe</a></p>
  
  <p>Thank you for your time.</p>