I tried commenting on the response by Rob in the original post: Google Script to Fill out HTML Form
But I am shy of 11 points to do so, hence asking my own question here. I have a similar web form automation requirement and I like Rob's response on using
UrlFetchApp.fetch(url, options)
I like this approach as it is clean, and can wait for response from server. This helps in batch processing multiple forms. There is no fiddling around with DOM elements or adding delays that may fail due to runtime issues like sudden drop in internet speed.
My question however is, how do I create session if the website requires me to login? I did lookup documentation but couldn't find session options: https://developers.google.com/apps-script/reference/url-fetch/url-fetch-app
I am open to suggestions if I can write my own program in VSCode using Node.js, JQuery, javascript etc, that loads json file as data and something that I can post on GitHub/GitLab for others to use as well. I know VBA method of doing it, but it relies on DOM elements to mimic user interaction. There is another program mini mouse macro
that has a great reputation, but its an exe and mimics user interaction of clicks and delays. I want to see code that I am running.
Aucun commentaire:
Enregistrer un commentaire