Hi
Need help to input username and password programmatically in page that doesnt have ID tag on the input box
Code: HTML/ASPX
<div class="mt-6">
<form method="POST" action="https://portal.pejer.app/login">
<input type="hidden" name="_token" value="BWE7u1qzZpmzmUCrCH6IioybrktrvC8aZ6W45piQ">
<div class="mb-6">
<div>
<label class="block text-sm font-medium leading-5 text-gray-800">Email</label>
<div class="mt-1 relative rounded-md shadow-sm">
<input type="email" class="form-input block w-full pr-10 focus:shadow-outline-red sm:text-sm sm:leading-5 " name="email" value="">
</div>
</div>
</div>
<div class="mt-6">
<div>
<label class="block text-sm font-medium leading-5 text-gray-800">Password</label>
<div class="mt-1 relative rounded-md shadow-sm">
<input type="password" class="form-input block w-full pr-10 focus:shadow-outline-red sm:text-sm sm:leading-5 " name="password" value="" >
</div>
</div>
</div>
I know that if the page using id we only need to do :
document.getElementById('idname').value='inputvalue'
But on that code there is no id, i have try using GetElementbyClassName
document.getElementsByClassName('input.form-input.block.w-full.pr-10.focus\:shadow-outline-red.sm\:text-sm.sm\:leading-5').value="insertvalue"
but not working
any help to make this right ?
Thank you