WebPagetest Forums
[solved]How do i confirm/cancel JavaScript pop-up/alert ? - Printable Version

+- WebPagetest Forums (https://www.webpagetest.org/forums)
+-- Forum: WebPagetest (/forumdisplay.php?fid=7)
+--- Forum: General Discussion (/forumdisplay.php?fid=25)
+--- Thread: [solved]How do i confirm/cancel JavaScript pop-up/alert ? (/showthread.php?tid=14167)

[solved]How do i confirm/cancel JavaScript pop-up/alert ? - bojankacarski - 01-15-2016 09:35 PM

Hello i tried to find this answer in the documentation but couldn't. I'm doing a script which navigates to a certain point and opens a JS pop-up/alert window which i want to confirm but couldn't find the command i must execute in order to do so. Any ideas ?

p.s. Hello guys i found a solution for my question so i will share it with you if anyone ends up having the same problem:
from the browser inspector i found that the script (which fires the alert) has a DOM property which has "_ConfirmOnFormSubmit" with value set to false just attached the following step to my script
"exec ctl00_cph_MainContent_DocumentView1_ib_Delete.ConfirmButtonBehavior._ConfirmOnFo​rmSubmit=true;" which makes this true and here you go there is no confirmation window (submits the form automatically)

Keep up the good work WPT is awesome !

RE: [solved]How do i confirm/cancel JavaScript pop-up/alert ? - pmeenan - 01-21-2016 12:09 AM

Great. Glad you found a solution. WPT doesn't let you interact with pop-up dialogs and it dismisses all of them automatically so there isn't any generic way to handle it.