diff --git a/lib/automations.ts b/lib/automations.ts index 4db61c2..75ad4ae 100644 --- a/lib/automations.ts +++ b/lib/automations.ts @@ -311,8 +311,7 @@ export const FIRMS: Firm[] = [ { action: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked)', frame: '#woocommerceModal iframe', label: 'Agree to terms' }, // 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: 'click', selector: '.validate-required input[type="checkbox"]:not(:checked):last-child', 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' },