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

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -