title: Python Webdriver how to handle a browser pop up. It is not an alert generated by JavaScript
body: <p>I have come accross a pop up while my Python Webdriver script was executing.
  Scenario: User can click Add project button from the Admin page and enter a project name etc click Save.
  If the project already exists a pop up is shown to say project with this name already exists.</p>
  
  <p>I want to close this pop up.  I have inspected the HTML and there is no on click JavaScript function to call the alert.  It is not a JavaScript alert.
  It is a pop up generated by GWT in the browser.<br>
  The dev uses GWT to develop the UI.</p>
  
  <p>The HTML is:</p>
  
  <pre><code>&lt;div class="gwt-PopupPanel" style="visibility: visible; overflow: visible; position: absolute; left: 687px; top: 170px;"&gt;
      &lt;div class="popupContent"&gt;
          &lt;div class="GAT4PNUJO" style="position: relative;"&gt;
              &lt;div style="position: absolute; z-index: -32767; top: -20ex; width: 10em; height: 10ex; visibility: hidden;" aria-hidden="true"/&gt;
              &lt;div style="position: absolute; overflow: hidden; left: 0px; top: 0px; right: 0px; bottom: 0px;"&gt;
                  &lt;div style="position: absolute; left: 0px; top: 0px; right: 0px; bottom: 0px;"&gt;
                      &lt;div class="GAT4PNUPO GAT4PNUNO"&gt;
                          &lt;div class="gwt-Label GAT4PNUOO"&gt;Add Project&lt;/div&gt;
                      &lt;/div&gt;
                      &lt;div class="GAT4PNUMO"&gt;
                      &lt;div class="gwt-HTML GAT4PNUIO GAT4PNUKO"&gt;An engine message has been returned. Original message: There is already a scv project with name 'test001'&lt;/div&gt;
                      &lt;div class="GAT4PNUHO GAT4PNULO"&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>Is there a way I can check if the pop up is shown and then click it in Python Webdriver?</p>
  
  <p>I have read in another post someone mentioned to use Robot.  I think that is Java only.</p>
  
  <p>I have tried </p>
  
  <pre><code>alert = self.driver.switch_to_alert()       
  alert.accept()  
  </code></pre>
  
  <p>just to check and prove it is not a JavaScript alert.  The error shown is  </p>
  
  <blockquote>
    <p>NoAlertPresentException: Message: No alert is active</p>
  </blockquote>