title: How to automate basic authentication chrome alert
body: <p><a href="https://i.stack.imgur.com/2GvZv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2GvZv.png" alt="Chrome authentication popup"></a></p>
  
  <p>Have tried several approached to handle it but none worked.</p>
  
  <ol>
  <li><p><code>https://user:password@pageaddress.com</code> - doesn't work, chrome launches controlled bu automates test software and authentication pop-up appears anyway.</p></li>
  <li><p>Adding <code>--disable-blink-features=BlockCredentialedSubresources</code> to Chrome arg and repeat 1'st point - doesn't work, reason the same as in 1'st point.</p></li>
  <li><p><code>driver.switchTo().alert.authenticateUsing(new UserAndPassword(user, password))</code> - here seems like driver doesn't see an alert, have impelented method that checks it and returns false:</p>
  
  <p><code>private Alert alert;
   public boolean isAlertPresent() {
      try {
          waitForTimeout(10, TimeUnit.SECONDS);
          alert = driver.switchTo().alert(); 
          return true;
      } catch (NoAlertPresentException e) {
          return false;
      }}</code></p></li>
  <li><p>Triggering keyboard or mouse event via selenium <code>Action()</code> doesn't work too.</p>
  
  <p><code>chromedriver 2.31
  Google Chrome Version 61</code></p></li>
  </ol>
  
  <p>Any other ideas ? Maybe some js script ? </p>