Page 1 of 1

how to get user input and use it

Posted: Fri Mar 11, 2016 12:33 pm
by aaf1983
Hey

i am new in the application. So maybe it is a very simple question.

I would like the Ranorex is opening a browser and visit the login page of my website (i did)
Now I want Ranorex to wait for the user name and password from the user and only then continue the script\process.


could you guide me how to do it?

Thanks

Re: how to get user input and use it

Posted: Mon Mar 14, 2016 8:43 am
by odklizec
Hi,

I think the easiest way to achieve what you want is to use WaitFor Exists/NotExist method.

Simply add an element (confirmation window, status text, etc), which typically appears after user's login, to repository. Then Drag&Drop the repo element from repository to recording/code module and from the appeared menu select WaitFor action. Then adjust its parameter to Exists or Not Exists. Hope this helps?

Re: how to get user input and use it

Posted: Tue Mar 15, 2016 2:26 pm
by krstcs
Maybe I have this wrong, but you want to have the test WAIT ON USER INPUT before it continues? Is that right?

If so, you are doing it wrong. Test automation should not have user input. That is the point of automation. What happens when you need to run 4 tests at the same time, what about 10, or 100 (like some of us)? What about when you need to start running the tests at night when no one is actually there?

If this really is the case then you need to re-think your approach. If you are going to automate, then automate all of it.

If you have issues with having the password saved in the code because it's a real person's password, then change to using a test user with a known password and have the user only be available on your test system, not your production system.