Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Browser automation from the browser's JS environment [closed]

There are about a dozen javascript APIs for doing DOM/http automation (for scripts like: go to this URL then click "login" then type "foo" in username and "bar" in password then click submit) but all the ones I've seen either expect to run inside Node or worse expect access to some binary like Webkit etc...

Isn't there any library that I can load into my browser's JS environment at runtime (just like I can load Jquery or whatever) that will give me basic automation functionality? (request a url, query the DOM, click buttons, enter form data, etc)

It would be nice if I could watch what's happening while my automation scripts run, but that's not strictly necessary and I have a feeling this might ...it could just use Request or something.

like image 853
themirror Avatar asked Feb 02 '26 04:02

themirror


1 Answers

Why not just run some code in your console?

(jquery example)

$('#form #inputElem').val('username');
$('#form #inputElem2').val('password');
$('#form').submit();
like image 56
heckascript Avatar answered Feb 04 '26 17:02

heckascript



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!