Skip to content

Instantly share code, notes, and snippets.

@cuzzo
Last active August 29, 2015 14:27
Show Gist options
  • Save cuzzo/f3926b655c0f611a01bd to your computer and use it in GitHub Desktop.
Save cuzzo/f3926b655c0f611a01bd to your computer and use it in GitHub Desktop.
BankersEdge Compliance Test Advance
var complete_test = function() {
var content = window.parent.frames["ScormContent"].document.querySelectorAll("frame")[0].contentDocument;
if (content.querySelector("h3").innerText === "Post-Test" || content.querySelector("h3").innerText === "Posttest") {
clearInterval(interval_id);
console.log("CLEARED!");
return;
}
if (content.querySelector(".artisan-question-text")) {
if (content.querySelector(".artisan-answer").querySelector("[type=radio]")) {
content.querySelector(".artisan-answer").querySelector("[type=radio]").click();
}
else if (content.querySelector(".artisan-answer").querySelector("[type=checkbox]")) {
content.querySelector(".artisan-answer").querySelector("[type=checkbox]").click();
}
else if (content.querySelector(".artisan-answer").querySelector("[type=text]")) {
content.querySelector(".artisan-answer").querySelector("[type=text]").value = "poopydoopy";
}
content.querySelector("#artisan-question-submit").click();
content.querySelector(".artisan-next").click();
}
else {
content.querySelector(".artisan-next").click();
}
}
var interval_id = setInterval(complete_test, 1000);
@cuzzo
Copy link
Author

cuzzo commented Aug 21, 2015

Paste in the console to advance to the Post-Test.

@cuzzo
Copy link
Author

cuzzo commented Aug 21, 2015

Also, from the portal, you can open up all of the tests concurrently to advance them to the end by opening up the console and deleting the mask it places over the tests once you start one.

Run this command in the JavaScript console:

$(".ext-el-mask").remove();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment