title: AutoIT For Chrome Not Working - Basic Authentication Dialog workaround for Selenium WebDriver Automation
body: <p>I am trying to automate my test cases using selenium webdriver in java. It involves Basic Authentication Dialogs. For making IE, Chrome, FF Compatible using kind of same approach I have to use AutoIT I am done with IE and FF but for Chrome it is not working. I am using <code>AutoIT Window Info</code> tool for finding out Class and Control Name. But Chrome is pretty different in that case can anyone help? </p>
  
  <p>Here is code for working IE and FF</p>
  
  <pre><code> $classForBasicAuthenticationWindow = "[CLASS:#32770]"
   $username = "XXXXXX"
   $password = "XXXXXX"
  
   WinWait($classForBasicAuthenticationWindow,"",120)
   If WinExists($classForBasicAuthenticationWindow) Then
      WinActivate($classForBasicAuthenticationWindow)
      Send($username)
      Send("{TAB}")
      Send($password &amp; "{Enter}")   
    EndIf
  </code></pre>
  
  <p>It is similar for FF, The above is for IE</p>
  
  <p>For Chrome I have written this so far if you consider the <code>window info</code> tool you will understand that the popup is not a different window in case of chrome. So it become a bit complicated. Anyways here is what I have tried : </p>
  
  <pre><code>$classForBasicAuthenticationWindow = "[CLASS:Chrome_WidgetWin_1]"
  $username = "XXXXX"
  $password = "XXXXX"
  
  WinWait($classForBasicAuthenticationWindow,"",120)
  If WinExists($classForBasicAuthenticationWindow) Then
  WinActivate($classForBasicAuthenticationWindow)
  While 1
     $isAuthenticationRequiredVisible = ControlGetHandle($classForBasicAuthenticationWindow, "", "[CLASS:ViewsTextfieldEdit; INSTANCE:2]")
    If $isAuthenticationRequiredVisible &lt;&gt; "" Then 
       MsgBox($isAuthenticationRequiredVisible)
       ExitLoop
    EndIf
  WEnd
  ControlSend($classForBasicAuthenticationWindow, "", "[CLASS:ViewsTextfieldEdit; INSTANCE:2]", $username)
  EndIf
  </code></pre>