Batch Delete Bulk Delete Transactions for Quickbooks Online using Macro (Firefox Selenium IDE add-on)

The short answer is, that Quickbooks does not provide any way to Bulk Delete or Batch Delete transactions for Quickbooks Online.

My understanding is that this feature is only available for desktop versions of Quickbooks.

So if for some reason you have many transactions to delete in QBO, you will need to delete them one at a time.

I recently had to delete over 4,000 transactions, so this would have taken forever.

The work around is that I wrote a macro in Firefox using Selenium IDE to delete all transactions in any one register.

WARNING: This macro will delete ALL transactions in a register, including split and reconcilled transactions, so use with caution.

Once you run the macro, you will need to click on the first row in the register to get it started. Note that sometimes you have to re-start the macro a few times before it takes off and starts working.

Attached is the Selenium project file (a .side file) that I used. Download it, and then you can start Selenium and then choose Open Project and select this file:
QBO_DELETE.side

Or you can manually enter each step of the macro into the Selenium IDE editor:

Command: open
Target: https://app.qbo.intuit.com/app/register
Description: You can set the target to a specific register URL, otherwise this will select the first register in your chart of accounts.

Command: set window size
Target: 1250x900
Description: Set this to whatever works for you.

Command: execute script
Target: var c=0; return c;
Value: counter
Description: Set up a counter to count how many transactions we have deleted.

Command: while
Target: true == true
Description: Set up a loop that will run until it can not find anymore transactions.

  Command: click
  Target: css=.dgrid-focus
  Description: This will initially wait until you click on the first row in the register.

  Command: click
  Target: css=.buttonSection > .button:nth-child(1)
  Description: Click on the DELETE button for transaction.

  Command: store xpath count
  Target: xpath=//div[contains(@class,'message') and contains(text(),'This is just one part of a split transaction. Deleting it will remove the whole transaction. Are you sure you want to delete?')]
  Value: theValue1
  Description: Does this text exists in a message box? If yes, then we need to click YES button below. If not then skip the click.

  Command: if
  Target: ${theValue1}>0

    Command: click
    Target: css=div:nth-child(3) > .button
    Description: Confirm deletion of SPLIT transaction by clicking YES.

  Command: end
  Description: end if

  Command: store xpath count
  Target: xpath=//div[contains(@class,'message') and contains(text(),'This transaction was downloaded from your bank’s records. If you delete it now and change your mind later, you can add it back through the Online Banking page. Are you sure you want to delete it?')]
  Value: theValue2
  Description: Does this text exists in a message box? If yes, then we need to click YES button below. If not then skip the click.

  Command: if
  Target: ${theValue2}>0

    Command: click
    Target: css=div:nth-child(3) > .button
    Description: Confirm deletion of transaction by clicking YES.

  Command: end
  Description: end if

  Command: store xpath count
  Target: xpath=//div[contains(@class,'message') and contains(text(),'The transaction you are deleting has been reconciled. Deleting your changes could put you out of balance the next time you try to reconcile. Are you sure you want to delete it?')]
  Value: theValue3
  Description: Does this text exists in a message box? If yes, then we need to click YES button below. If not then skip the click.

  Command: if
  Target: ${theValue3}>0

    Command: click
    Target: css=div:nth-child(3) > .button
    Description: Confirm deletion of RECONCILLED transaction by clicking YES.

  Command: end
  Description: end if

  Command: execute script
  Target: var c=${counter}; c=c+1; return c;
  Value: counter
  Description: Increase the counter by 1.

  Command: echo
  Target: ${counter}
  Description: Display the counter in the log.

Command: end
Description: end while loop