Page 1 of 1

(Recursive entry in a search box)

Posted: Wed Jun 24, 2015 11:21 am
by satishmohan
Hi Team. I have a search box where i need to enter values in series one after other and see if i can search for the value. Once i get the first value i have to erase the already entered value in search box and re-enter the second value, and so on. The values are in an excel file. Please suggest how do i search without logging off from the application after every search results. PFA the snap shots.

Re: (Recursive entry in a search box)

Posted: Wed Jun 24, 2015 11:45 am
by odklizec
Hi,

What you need to do is to convert your exisitng project to data driven one. Learn how to use data driven approach here:
http://www.ranorex.com/support/user-gui ... sting.html
and here:
http://www.ranorex.com/support/screencasts.html#c3896

At first, you need to split your recording to (at least) two recordings (e.g login and validate).
Then you need to create a Test Case with data connector, pointing to your excel file.
Then you have to put the validate recording to that test case.
And finally, you need to connect the ProductNumber (from excel) with $productName variable

So your solution should look like this:

Code: Select all

[Solution root]
Login
|_[TestCase] <- data connector here
    |_Validate <- here you should set the string from excel to search box and validate result. Ideally, you should split this step to more recordings (set data, validate data).
If you successfully do all the above steps, your test should login (just once) and repeatedly set and validate data from provided excel data connector. Hope this helps? ;)

Re: (Recursive entry in a search box)

Posted: Wed Jun 24, 2015 1:43 pm
by satishmohan
Hi. Yes, data driven, i am used to it. Though i create two different sessions (login & validate), as you suggested it is logging into application as many times as no of rows in excel. PFA snapshot and project file. Not sure on how to make validate as the child of login.
[Solution root]
Login
|_[TestCase] <- data connector here
|_Validate <- here you should set the string from excel to search box and validate result. Ideally, you should split this step to more recordings (set data, validate data).

Re: (Recursive entry in a search box)

Posted: Wed Jun 24, 2015 1:50 pm
by odklizec
Hi,

You must either put the TestCase inside another one or even easier, enable TestSuite Setup/Teardown section and put the Login module to Setup section.
Right click TestSuite and from the appeared menu select Add Setup/Teardown...
Setup.png

Re: (Recursive entry in a search box)

Posted: Wed Jun 24, 2015 4:20 pm
by satishmohan
Hi. Issue resolved. Thanks again :)