closeConfirm
closeConfirm(":dummy", confirmed)
This function is used to simulate the user clicking Yes or No in the dialog that JavaScript pops up in response to a confirm
function call in a web page's JavaScript code. The first parameter must be a fake object name (e.g., ":dummy"
); the confirmed
is a Boolean, with true
indicating the user clicked Yes, and false
indicating that the user clicked No.
Behind the scenes, when Squish tests a web application that executes a JavaScript confirm
function call, instead of Squish allowing the dialog to pop up, Squish suppresses the dialog (if the browser allows this, otherwise the dialog will be automated), stops execution of the web application, and calls the closeConfirm
function, passing true
if it was recorded that the tester clicked Yes or false
if they clicked No. Then Squish resumes the web application's execution, returning the true
or false
result to the application as the confirm
function call's return value.
See also String lastConfirmText(browserTab).
© 2024 The Qt Company Ltd.
Documentation contributions included herein are the copyrights of
their respective owners.
The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.
Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners.