answerOnNextPrompt (text) - Selenium IDE command

answerOnNextPrompt tells the IDE what to answer at the next prompt dialog. You find an example of such a dialog on this test page.

For simple confirmation dialogs (= OK/Cancel dialogs), chooseOkOnNextConfirmation was used in the old Selenium IDE. It is no longer needed in Kantu, as this behavior is now built-in (Ui.Vision RPA clicks OK automatically).

answerOnNextPrompt Example

The macro below first opens a prompt, and then Ui.Vision RPA IDE enters "Hello World" in it and closes it automatically.

Command Target Pattern/Text
open https://ui.vision/demo/javascript
answerOnNextPrompt Hello World! -
click //*[@id="content"]/div[2]/div/p[2]/button[2] -

Works in

Ui.Vision RPA for Chrome Selenium IDE, Ui.Vision RPA for Firefox Selenium IDE, Firefox IDE Classic

Related Demo Macros

Demo-Autofill, Demo-Frame

The ready-to-import-and-run source code of all demo macros can be found in the Open-Source RPA software Github repository.

See also

assertAlert, assertConfirmation, assertPrompt, Web Automation Extension User Manual, Selenium IDE commands, Classic Firefox Selenium IDE.

Anything wrong or missing on this page? Suggestions?

...then please contact us.

<em>Ui.Vision RPA</em> Selenium IDE for Chrome and Firefox - Web Test Automation

Fresh from the Ui.Vision Forum: The Latest 3 RPA Software Discussions

← Meet the Ui.Vision team and users on our RPA software forum.