I am trying to skip questionnaire automatically to see my exam marks easily. Because I don't want to do this manually for each exam. So I am writing a script to do that.
setTimeout(function(){
$(".btn-danger:eq(0)").click();
setTimeout(function(){
$(".multiselect:eq(0)").click().first();
setTimeout(function(){
$('.checkbox input[type=checkbox]').prop('checked', true).click();
}, 2000);
setTimeout(function(){
$(".multiselect:eq(1)").click().next();
$('.checkbox input[type=checkbox]').prop('checked', true).click();
}, 2000);
setTimeout(function(){
$(".multiselect:eq(2)").click().next();
$('.checkbox input[type=checkbox]').prop('checked', true).click();
}, 2000);
}, 5000);
});
There is many radiobuttons, textboxes and multiple dropdown list with checkbox. Everything is ok except the multiple dropdownlist with checkboxes.
This code selecting all of the options like this:
[dropdownlist][1]
[1]: https://i.stack.imgur.com/SuCXk.jpg
There is 2 more dropdownlist here. Code select all of the options in order. When the first one ok, then the second one runs. But the first one's values getting unselected. When the third one runs the second one getting unselected too. Only the last one works correctly.
How can I achive my goal?