How to automatically open a website and fill out a form and submit it?

Everyday I have to login for work and I wanted to know how can I automate the process without installing a 3rd party software or browser extension since I’m using my work’s computer.

I created a batch file to open the login website.

@ECHO OFF
start https://login.example.com

And I know that if I run this code on the developer console it would achieve what I’m looking for.

document.getElementById("username").value = 'UserExample';
document.getElementById("passwd").value = 'PassExample';
document.getElementById("Log_On").click();

But I can’t find how to automate the second part which is filling out the form.

Thanks in advance.