title: How to select two files and upload them?
body: <p>I am using AutoIt in Selenium WebDriver to select and upload a file. I want to select multiple files to upload. There is a button &quot;upload&quot; to open the file explorer.</p>
  <p>AutoIt script:</p>
  <pre><code>ControlFocus(&quot; Open &quot;,&quot; &quot;,&quot;Edit1&quot; )
  Global $files=&quot;&quot;,$appendquotes=&quot;&quot;,$j=2;
  IF $cmdLine[0]==1 then
     $files=$CmdLine[1]
  ElseIf $cmdLine[0] &gt; 1 Then
     For $i=1 to $cmdLine[1]
        $appendquotes='&quot;' &amp; $CmdLine[$j] &amp; '&quot;';
        $files=$files &amp; &quot; &quot; &amp; $appendquotes;
        $j=$j+1;
     Next
  EndIf
  
  ControlSetText(&quot;Open&quot;,&quot;&quot;,&quot;Edit1&quot;,&quot;D:\tfs\colors.TIF&quot; &quot;D:\tfs\colors1.TIF&quot;)
  ControlClick(&quot;Open&quot;,&quot;&quot;,&quot;Button1&quot;)
  </code></pre>
  <p>Java class code:</p>
  <pre><code>DriverOperations.clickWhenElementIsClickable(upload);
  Runtime.getRuntime().exec(&quot;D:\\AutoIT\\FileUploadMulti.exe&quot;);
  </code></pre>