i want to autofill input field on page load, yes i am injecting javascript in website, i have tried xpath method
function inputfillclick() {
var xpath = "//input[@type='password']";
var inputElement = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (inputElement) {
inputElement.value = "KuchBhi";
} else {
console.log("Input element not found.");
}
}
it is working but not fully i mean, after filling input i can't click login button, but if i paste or remove one letter and again type then login button enabled, is there any otherway to do that, i have used another extension that is working which is also fill input using xpath, but for some reasons i can't use that extension,
here is element code
<input maxlength="140" step="" enterkeyhint="done" autocomplete="off" type="password" class="uni-input-input">
you can clearly see in the picture that this method is not filling input fully i mean, placeholder text is still showing,password problem