title: Close download bar
body: <p>I am using Java and Selenium to write a test. Somewhere in my test, I download a file but then need to click on a button under the download bar which appears at the bottom of the chrome browser page. I search a lot but the only solution was <a href="https://stackoverflow.com/questions/31476288/how-to-close-download-banner-with-chrome-webdriver">here</a> which is not my case as I don't have a scroll. </p>
  
  <p>I also use:</p>
  
  <pre><code>action.sendKeys(Keys.CONTROL+ "j").build().perform();
  action.keyUp(Keys.CONTROL).build().perform();
  Thread.sleep(500);        
  ArrayList&lt;String&gt; tabs2 = new ArrayList&lt;String&gt; (driverChrome.getWindowHandles());
  driverChrome.switchTo().window(tabs2.get(1));
  Thread.sleep(500);
  driverChrome.close();
  driverChrome.switchTo().window(tabs2.get(0));
  Thread.sleep(500);
  </code></pre>
  
  <p>but it doesn't open the download page.</p>
  
  <p>Anyway that I can close the download bar?</p>