title: "No modal dialog is currently open" after setting up proxy Python Selenium
body: <p>I'm using a proxy in my webdriver, and it has a user/pass authentication dialogue that pops up. After a lot of searching I decided the easiest way to deal with it is to use an autoit script which looks like this:</p>
  
  <pre><code>#Include &lt;File.au3&gt;
  
  WinWaitActive("Authentication Required")
  Send(proxyuser)
  Send("{TAB}")
  Send(proxyuser)
  Send("{ENTER}")
  </code></pre>
  
  <p>I invoke the script like so:</p>
  
  <pre><code>subprocess.run('proxyscript.exe')
  </code></pre>
  
  <p>The problem is, after I do this, anything running in my python selenium web driver script gives the error "No modal dialog is currently open". I'm not really sure what it means or how to fix it.</p>
  
  <p>My webdriver settings look like this:</p>
  
  <pre><code>        caps = DesiredCapabilities().FIREFOX
          caps["pageLoadStrategy"] = "eager"
          fp = webdriver.FirefoxProfile('firefoxadblocked')
  
          proxyString = ad_proxy_array[0] + ':' + ad_proxy_array[1]
  
          caps['proxy'] = {
                      "proxyType": "manual",
                      "httpProxy": proxyString,
                      "ftpProxy": proxyString,
                      "sslProxy": proxyString
                  }
  </code></pre>