cancelPrompt

cancelPrompt()

This function is used to simulate the user canceling the dialog that JavaScript pops up in response to a call to the prompt function in a web page's JavaScript code.

Behind the scenes, when Squish tests a web application that executes a JavaScript prompt function call, instead of Squish allowing the dialog to pop up (if the browser allows this, otherwise the dialog will be automated), Squish suppresses the dialog, stops execution of the web application, and calls the cancelPrompt function if replaying a cancel or the closePrompt(":dummy", text) function if replaying an okay. Then Squish resumes the web application's execution.

See also closePrompt(":dummy", text), String lastPromptDefault(browserTab) and String lastPromptText(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.

Search Results