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

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

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -