i want to fill input value with click function, like this
<script>
function inputfillclick() {
document.getElementById('inputidx').value="KuchBhi"
}
</script>
<input type="text" id="inputidx" name="inputidx" />
<button class="button" onclick="inputfillclick()">Fill Now</button>
but the problem is i want do this on other page where the input field does not have id, i want to do this via xpath, is there any way?
<input maxlength="140" step="" enterkeyhint="done" autocomplete="off" type="password" class="uni-input-input">
and xpath is
//input[@type='password']
full xpath
/html/body/uni-app/uni-page/uni-page-wrapper/uni-page-body/uni-view/uni-view/uni-view[3]/uni-view[2]/uni-view[2]/uni-input/div/input