title: Handling Windows authentication pop up
body: <p>Below is my AutoIt script (UI3_Authentication.au3) for handling a Windows authentication pop up.</p>
  
  <pre><code>AutoItSetOption("WinTitleMatchMode","2")  
  WinWait("Authentication Required")   
  $title = WinGetTitle("Authentication Required") ; retrives whole window title   
  $UN=WinGetText($title,"User Name:")  
  ControlSend($title,"",$UN,"test");Sets Username  
  $PWD=WinGetText($title,"Password:")  
  Send("{TAB 1}")  
  ControlSend($title,"",$PWD,"test1234");Sets PWD  
  Send("{ENTER}")  
  </code></pre>
  
  <hr>
  
  <p>Below is my Selenium code call to the above AutoIt exe file.</p>
  
  <pre><code>package tests;
  
  import java.io.IOException;  
  import org.openqa.selenium.WebDriver;  
  import org.openqa.selenium.firefox.FirefoxDriver;  
  
  public class Handling_Windows_Based_Prompt {
  
  public static void main(String[] args) throws IOException{  
  WebDriver c1 = new FirefoxDriver();  
  c1.get(“http://www.test.com”);  
          Runtime.getRuntime().exec("C:\\POM_Newdemo\\EF_Automation_Demo\\UI3_Authentication.exe");
  
  }  
  }
  </code></pre>
  
  <hr>
  
  <p>When I run the above Selenium file, it opens up the page and authentication pop up. But it is not inserting username and password; it waits for user input instead.</p>