[英]Autoclick on a button in popped up dialog box
How to auto-click on Yes or No button on a dialog box which pops up on a website? 如何自动在网站上弹出的对话框中单击是或否按钮?
One crude way I'm using is to set a timer to trigger click on button if the dialog box is visible once every 100ms. 我使用的一种粗略方法是设置一个计时器,以在对话框每100毫秒可见一次时触发单击按钮。
Check the following options: 检查以下选项:
confirm()
or alert()
methods, then you cannot click programatically on the buttons to dismiss. 对于本机的confirm()
或alert()
方法,则无法以编程方式单击按钮以将其关闭。 They can be closed only on user interaction. 它们只能在用户交互时关闭。 click
event on the necessary button from the mutation observer handler. 将模态元素插入DOM后, click
从突变观察程序处理程序的必要按钮上触发click
事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.