From 45f71cbecf2b2abc35598c196f10343137a8d0ec Mon Sep 17 00:00:00 2001 From: Brandon Li Date: Thu, 3 Sep 2026 13:04:43 -0500 Subject: [PATCH] add repeating to the tradeify dashboard --- lib/automations.ts | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/automations.ts b/lib/automations.ts index 42b6885..8a66c27 100644 --- a/lib/automations.ts +++ b/lib/automations.ts @@ -181,18 +181,20 @@ export const FIRMS: Firm[] = [ // link — confirmed against a real capture, matchCount 1. The MUI // hash classes on the same element (mui-*) are regenerated on // every site build, so they are not safe to select on. - - { action: 'click', selector: 'a.add_account_btn', label: 'Open Add Account' }, - { action: 'waitFor', selector: 'div.account_types:nth-child(3) > div[role="radiogroup"] > div > div:nth-child(2)', timeoutSeconds: 30, label: 'Wait for form' }, - { action: 'click', selector: 'div.account_types:nth-child(3) > div[role="radiogroup"] > div > div:nth-child(2)'}, - { action: 'click', selector: '.MuiBox-root:last-child div.account_types:last-child span:last-child'}, - { action: 'click', selector: 'div.summary_section div.MuiTextField-root input'}, - { action: 'type', selector: 'div.summary_section div.MuiTextField-root input', text: 'MX8'}, - { action: 'click', selector: 'div.summary_section div.MuiTextField-root + button'}, - { action: 'solveCaptcha', timeoutSeconds: 180, label: 'Solve the challenge' }, - { action: 'click', selector: 'div.summary_section > button.MuiButton-fullWidth', label: 'Buy Account' }, - // TODO: the rest of the purchase flow. Confirm each selector with - // `clicker.py locate` before adding it here. + { action: 'repeat', timesFrom: 'count', steps: [ + { action: 'click', selector: 'a.add_account_btn', label: 'Open Add Account' }, + { action: 'waitFor', selector: 'div.account_types:nth-child(3) > div[role="radiogroup"] > div > div:nth-child(2)', timeoutSeconds: 30, label: 'Wait for form' }, + { action: 'click', selector: 'div.account_types:nth-child(3) > div[role="radiogroup"] > div > div:nth-child(2)'}, + { action: 'click', selector: '.MuiBox-root:last-child div.account_types:last-child span:last-child'}, + { action: 'click', selector: 'div.summary_section div.MuiTextField-root input'}, + { action: 'type', selector: 'div.summary_section div.MuiTextField-root input', text: 'MX8'}, + { action: 'click', selector: 'div.summary_section div.MuiTextField-root + button'}, + { action: 'solveCaptcha', timeoutSeconds: 180, label: 'Solve the challenge' }, + { action: 'click', selector: 'div.summary_section > button.MuiButton-fullWidth', label: 'Buy Account' }, + // TODO: the rest of the purchase flow. Confirm each selector with + // `clicker.py locate` before adding it here. + { action: 'navigate', label: 'Open the Tradeify dashboard' }, + ]}, ], },