Trying to automate logging into a website, going to a url, and pressing a button

Viewed 19

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();
2 Answers

you should take a look at puppeteer. It's a nice tool to automate browser tasks like you're trying to do. Doing it manually (and especially with jQuery) is probably going to take up more time and nerves instead of just learning to use puppeteer.

Hi Aly and welcome to the community! If you're using a windows, you should check out Windows Power Automate. I think it comes pre-installed and it's super simple to use.
Also it's no-code, so you only use their blocks.

Related