SOURCE

function inText(node,n) {
    let evt = document.createEvent('HTMLEvents')
    evt.initEvent('input',true, true)
    node.value = n
    node.focus()
    node.dispatchEvent(evt)
}

function loginTest(n,p) {
    let nameNode = document.getElementsByClassName('el-input__inner')[0]
    let pwdNode = document.getElementsByClassName('el-input__inner')[1]

    inText(nameNode,n)
    inText(pwdNode,p)
    $('.btn-long').click()
}

loginTest('admin','2021@inspur')
console 命令行工具 X clear

                    
>
console