How to autoclick Confirm Box ?

1,343 views
Skip to first unread message

gilan...@gmail.com

unread,
Apr 20, 2019, 3:46:47 AM4/20/19
to Autofill Chrome Extension
Hello Dears.

I have a html code, When button clicked, a confirm dialog box will appear. how to auto click or return true for confirm boxes?

I used this in javascript source file and It works, But I couldn't use This in Autofill, That's not work.
Please Help me.

The code in source:
 
<script>
var realConfirm=window.confirm;
window
.confirm=function(){
  window
.confirm=realConfirm;
 
return true;
};

function clickConfirm()
{
 
if(confirm("this is a test "))
 
{
   alert
("ok");
 
else{
   alert
("False");
 
}
}

</script>

<input type="button" name="btn" onclick = "
clickConfirm" value="clickMe"/>
 this code in source of file will work

but if I delete code in below, Then add to Autofill, That's not work.
var realConfirm=window.confirm;
window
.confirm=function(){
  window
.confirm=realConfirm;
 
return true;
};



Sailendra Karthik

unread,
May 2, 2021, 11:30:37 AM5/2/21
to Autofill Chrome Extension
Hi ,

Are you able to make this work in autofill ?

Autofill Chrome Extension

unread,
May 30, 2021, 5:10:26 PM5/30/21
to Autofill Chrome Extension
For security reasons you cannot automate closing a native Confirm prompt.
Reply all
Reply to author
Forward
0 new messages