javascript - Autoclick on a button in popped up dialog box -


how auto-click on yes or no button on dialog box pops on website?

one crude way i'm using set timer trigger click on button if dialog box visible once every 100ms.

check following options:

  • for native confirm() or alert() methods, cannot click programatically on buttons dismiss. can closed on user interaction.
  • for html based dialog box (bootstrap modal example), initiate mutation observer listener debounce of 50ms (debouncing allow reduce evaluation calls on bunch of elements added). when modal elements inserted dom, trigger click event on necessary button mutation observer handler.

Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -