closeAlert
closeAlert(":dummy")
This function is used to simulate the user clicking Ok in the dialog that JavaScript pops up in response to an alert
function call in a web page's JavaScript code. The first parameter must be a fake object name (e.g., ":dummy"
);.
Behind the scenes, when Squish tests a web application that executes a JavaScript alert
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 expects the closeAlert
function. Then Squish resumes the web application's execution as if the user had closed the dialog.
See also String lastAlertText(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.