Duplicate automations

This commit is contained in:
Brandon Li
2026-09-03 13:13:03 -05:00
parent 45f71cbecf
commit 9d4e7a36a7
+14 -1
View File
@@ -298,8 +298,21 @@ export const FIRMS: Firm[] = [
// makes the two clicks self-sequence — the first tick checks
// box one, so the second click resolves to box two — and
// re-clicking never un-ticks a box already checked.
//
// WooCommerce only stamps validate-required on its own
// required rows; the second agreement box here is theme
// markup without that class, so the second click also
// sweeps the whole checkout form for unchecked boxes —
// minus the ones that must never be ticked (different
// shipping address expands extra fields, mailing-list
// opt-ins). No skipIfNotFound: silently skipping the
// second agreement just moves the failure to the
// modal-close gate below with a misleading timeout.
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', label: 'Agree to terms' },
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', skipIfNotFound: true, label: 'Agree to terms 2' },
// Ticking box one can re-render the checkout (update_checkout);
// give it a beat so the second locate sees the settled DOM.
{ action: 'wait', seconds: 1 },
{ action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked), form.checkout input[type="checkbox"]:not(:checked):not(#ship-to-different-address-checkbox):not([name*="subscribe"]):not([name*="newsletter"]):not([id*="newsletter"]):not([id*="mailchimp"]):not([id*="mc4wp"])', frame: '#woocommerceModal iframe', label: 'Agree to terms 2' },
{ action: 'waitFor', selector: '#woocommerceModal', absent: true, hidden: true, timeoutSeconds: 30, label: 'Wait for the modal to close' },