Skip to content

Commit 6767270

Browse files
authored
Update script.js
1 parent c9fce3c commit 6767270

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

script.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
2-
// chanage keys value
3-
const ans = "CABDAAAAACDAADBABAABCAABDBABBCDABCCBCDAD";
1+
const ans = "AADACADCBDCBAACDABDCACBACACBAA";
42
const len = ans.length;
53

64
let i = 0;
75

86
const inter = setInterval(
97
() => {
10-
document.querySelector(`#${ans[i]}_${i+1}`).click(); // select the correct option
8+
document.querySelector(`#${ans[i]}_${i+1}`).click();
119
document.querySelector("#main_div > div.tableWidthPercent > div.onlineTestLeftDiv > div.qnav > span.saveNextButton > a").click(); // move to next question
1210
i++;
1311

1412
if(i == len){ // stop the interval when all questions are answered
1513
clearInterval(inter)
16-
document.querySelector("#activator").click(); // submit the test
17-
document.querySelector(`#box > div > div > div > div > input[type=radio]:nth-child(1)`).click(); // select the reason for submit
18-
document.querySelector("#close_confirmed").click(); // submit the test
14+
document.querySelector('#activator').click();
15+
document.querySelector('input[name="rd"][value="Y"]').click();
16+
if(confirm("Are you sure you want to submit?")){
17+
document.querySelector('#close_confirmed').click();
18+
}
1919
}
2020
}
2121
// 2 seconds(2000 milliseconds) for each question

0 commit comments

Comments
 (0)