TA的每日心情 慵懒 2022-3-8 01:49
签到天数: 2 天
[LV.1]初来乍到
初级工程师
积分 59
悬赏10 油猫币未解决
(async function() {
const options = ['A', 'B', 'AC', 'DC', 'A', 'AB'];
for (let option of options) {
if (option.length>1) {
let optio=option.split("")
for(var i=0;i<optio.length;i++){
let duoxuan=optio[i]
document.querySelector('.ng-star-inserted .ng-star-inserted [id$=-${optio[i]}]').click();
}
document.querySelector('.btn-next-item').click()
await new Promise(resolve => setTimeout(resolve, 1000));
}
else{
console.log(option)
document.querySelector(`.ez-radio-dot [id$=-${option}]`).click();
document.querySelector('.btn-next-item').click();
await new Promise(resolve => setTimeout(resolve, 1000));
}
}
})();
https://eztest.org/exam/session/195150/#/login 注册什么信息也不用填写
为什么会提示Uncaught (in promise) DOMException: Document.querySelector: '.ng-star-inserted .ng-star-inserted [id$=-${optio[i]}]' is not a valid selector 这个报错呢
我来回答