I manually clear around 20 tables every morning and am looking to automate the process. I am using Atom for code editing and automating the task with Task Scheduler. I do not get any errors, but the table is also not being cleared.
function clearProject() {
// Open new page
chrome.runtime.sendMessage({action: "openURL", url: 'url'});
//Login
jQuery("#cphContent_lblUsername").val("username");
jQuery("#cphContent_tbPassword").val("password");
document.querySelector("#login");
// Go to project
chrome.runtime.sendMessage({action: "openURL", url: 'table url'});
//Purge project
jQuery("#ContentPlaceHolder1_btnPurgeActivity").submit();
};
clearProject();