title: Test with spring boot and selenium does not work with embedded server
body: <p>Hello guys I'm using java 8 / Maven / Spring boot with Spring Security</p>
  
  <p>ChromeDriver 75.0.3770.140 and Chrome with corresponding version.</p>
  
  <p>I am trying to create a test with Selenium and I have a problem!</p>
  
  <p>If I put the youtube, google or other site the browser opens in the test and runs OK, but when I try localhost: 8080 doesn't open my page!</p>
  
  <p>I also get a warning!</p>
  
  <p>Has anyone ever experienced this?</p>
  
  <p>My dependencies     </p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-api&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-chrome-driver&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
          &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
          &lt;version&gt;2.52.0&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>My Test Code</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class SpringbootTestApplicationTests {
  
  WebDriver driver;
  
  @Before
  public void when_the_test_starts() {
      System.setProperty("webdriver.chrome.driver", "**chromedriver.exe");
      WebDriver driver = new ChromeDriver();
      driver.get("http://localhost:8080/login");
  }
  
  @Test
  public void test_login_page() {
  
      WebElement surname = driver.findElement(By.name("username"));
      surname.sendKeys("gmail@gmail.com");
  
      WebElement password = driver.findElement(By.name("password"));
      password.sendKeys("1");
  
      WebElement btn = driver.findElement(By.id("btn_login"));
      btn.click();
  
      String url = driver.getCurrentUrl();
      assertEquals(url, "http://localhost:8080/dashboard");
  }
  
  @After
  public void when_the_test_ends() {
      driver.close();
  }
  }
  </code></pre>
  
  <p>Warning</p>
  
  <pre><code>Starting ChromeDriver 75.0.3770.140 
  (2d9f97485c7b07dc18a74666574f19176731995c-refs/branch-heads/3770@{#1155}) on 
  port 38921
  Only local connections are allowed.
  Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
  </code></pre>