|
发表于
2022-11-25 10:08:07
|
显示全部楼层
本帖最后由 3199688577 于 2022-11-25 10:41 编辑
大佬,你好。我现在遇到一个问题,就是自动填充用户名和密码,点击登录后,需要在指定的ID处填入相应的文字,能自动登录。
登录后能填入第一个代码的文字"湖北省",第二个"数据检查"却无法填入(这是两个不同的页面,每个页面转换都会刷新),代码如下,请问大佬是什么原因?
var user="";
var pwd="";
if(document.querySelector("#uname")==null){
return;
}
document.querySelector("#uname").value="LAC2222";
document.querySelector("#psd").value="AA123456";
window.setInterval(function () {
document.querySelector(".login-btn").click();
},2500);
if(document.querySelector("#salesStoreName")==null){
return;
}
document.querySelector("#salesStoreName").value="湖北省";
if(document.querySelector(".inputText.searchText")==null){
return;
}
document.querySelector(".inputText.searchText").value="数据检查";
|
|