Execute method javascript with simulate browser

I would like to script my example (it’s an idea example it’s not for this site)

Exemple (no real!) :

  1. I open browser
  2. I open this url : https://www.thingiverse.com/thing:5752028
  3. I open console developper
  4. I launch a javascript method to load in the DOM for example downloadFile() (it does not really exist on this site it is to image or more real : document.getElementsByTagName(‘button’)[16].click() )
  5. a file download starts (as if I clicked on a direct download link)
  6. Save this file started

Any idea if is possible ? i thinks yes for unit test javascript no ?

Thx

No idea why i can do that..No limits language

Same :
simulate browser behaviour via Python (javascript, DOM) with no response 🙁