There is a website I have to access frequently which puts strings to a stack. There are two inputs on the browswer that have a default value, so the page opens with them filled out.
I have two commands which replaces the values in both of these to the inputs I'd like:
document.getElementsByName("input1")[0].value = "input1";
document.getElementsByName("input2")[0].value = "input2";
if I run this in the chrome browser console it works just fine, and I can click the up arrow to pull this up again next time I sent a string which is useful. However, I'd like to be able to save those two lines as a file on my local machine, so I can just run the file name once instead of having to copy the two lines for whichever inputs I want:
For example, instead of having to copy the above 2 lines at the beginning of my testing, I could just type in setInputs.js.
And for other inputs, I would have other files, so I could type in setInputsVersion2, 3, 4... etc. as I need to.
Is this possible?