How to create a prompt for the user to get input

Class library usage, coding and language questions.
Posts: 9
Joined: Thu Aug 27, 2015 3:44 pm

How to create a prompt for the user to get input

Post by riagarwal » Thu Aug 27, 2015 3:49 pm


I would like to know, if there is a possibility to create a prompt to the user to answer a question and then if the answer provided in prompt is correct then only the web page goes to next page (Login successful) using automation tool..

Ritesh Aggarwal

User avatar
Ranorex Guru
Ranorex Guru
Posts: 6529
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to create a prompt for the user to get input

Post by odklizec » Fri Aug 28, 2015 8:42 am

Hi Ritesh and welcome here,

I'm not quite sure I understand your question? If you want to access "Login successful" page, then you must pass the login page (user name/password), which should be a part of your automated app/web page? So why do you want to create some kind of user input prompt via Ranorex?

If nothing else, the purpose of test automation is to replace human element, so interrupting automated test and wait for user input is, in my humble opinion, a very bad practice ;)

Anyway, because Ranorex is fully compatible C#/VB .Net dev. environment, you can create almost anything you want. If you are using VB .Net, you can use InputBox function.
In C#, there is no direct equivalent of VB InputBox box, so you can either reference Microsoft.VisualBasic in your project and then call VB InputBox from C# code (as described here) or create something more complex, as described here.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration