Skip to content

Instantly share code, notes, and snippets.

@ym
Last active October 13, 2021 00:41
Show Gist options
  • Save ym/8a640cc33a2b89e3a7b12a560a2bc602 to your computer and use it in GitHub Desktop.
Save ym/8a640cc33a2b89e3a7b12a560a2bc602 to your computer and use it in GitHub Desktop.
(async () => {
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms));
const deleteTransaction = async () => {
// click the fucking table
$('.field-date')[1].click();
await sleep(1000);
// click the fucking delete button
$('button[data-automation-id="button-delete"]').click();
await sleep(1000);
// delete the fucking transaction
$('.qboDialog#yesNoDialog button.primary').click();
await sleep(3000);
}
// loop through the transactions
for (let i = 0; i < $('.field-date').length; i++) {
await deleteTransaction();
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment