title: Wordpress Upload Plugin Form Will Not Activate In Headless Browser
body: <p>I am working on a little project where PhamtomJS will log into my site and upload a plugin to it. I almost have it, except for one strange problem. Although the <code>file.upload</code> portion of my code works perfectly, the Install now button remains disabled. Here is a picture rendered from Phantom:</p>
  
  <p><a href="https://i.stack.imgur.com/wtBak.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wtBak.png" alt="Screenshot"></a></p>
  
  <p>As you can see, the button is still disabled. So when I try to click it using the <code>getElementById()</code> method, it will not work. Nor will it work if I try to submit the form by doing:</p>
  
  <pre><code>document.querySelector('form[action*="/wp-admin/update.php?action=upload-plugin"]').submit()
  </code></pre>
  
  <p>I have also tried enabling the button manually and then clicking it via Javascript, but that has not worked either. Any ideas?</p>
  
  <p><strong>EDIT</strong>
  When trying to pull the outer HTML of the button, I typed the following into <code>console</code>:</p>
  
  <pre><code>console.log(document.querySelector('#install-plugin-submit').outerHTML)
  </code></pre>
  
  <p>The result of this code was the following:</p>
  
  <pre><code>&lt;input type="submit" name="install-plugin-submit" id="install-plugin-submit" class="button" value="Install Now"&gt;
  </code></pre>