我正在尝试使用 javascript 使用更新的输入凭据打开 Netflix url。输入似乎在 HTML 表单中更新,但是当我触发登录按钮时,输入字段为空。非常感谢任何输入
WebEngineView {
id: webEngineView
focus: true
url: "https://www.netflix.com/de-en/login"
onLoadProgressChanged: {
if(loadProgress === 100){
webEngineView.runJavaScript("var input1 = document.getElementsByName('email');
input1[0].value =\"xxxxx@email.com\";",
function(result) { console.error("Email updated"); });
webEngineView.runJavaScript("var input2 = document.getElementsByName('password');
input2[0].value =\"*******\";",
function(result) { console.error("Password updated"); });
}
}
}