Solution:
Need to manually trigger the input event after the .value assignment
dom元素.value = "admin"
dom元素.dispatchEvent(new Event('input'))
Example: login page of fast os docker
let name = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p:nth-child(3) > input[type=text]")
let pass = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p:nth-child(5) > input[type=password]")
let login = document.querySelector("#app > section > section > main > div.main.clearfix > div > div > div > p.submit > button")
if(name && pass){
name.value = "admin"
name.dispatchEvent(new Event('input'))
pass.value = "888888"
pass.dispatchEvent(new Event('input'))
login.click()
}