answerOnNextPrompt (text) - Selenium IDE command

answerOnNextPrompt tells the IDE what to answer at the next prompt.

answerOnNextPrompt Example

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

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

Works in

Kantu for Chrome 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 Github repository testmacros folder.

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.

Kantu Selenium IDE for Chrome and Firefox - Web Test Automation
Subscribe to the a9t9 automation software newsletter . We'll send you updates on new releases that we're working on.