(Recursive entry in a search box)

Ask general questions here.
satishmohan
Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

(Recursive entry in a search box)

Post by satishmohan » Wed Jun 24, 2015 11:21 am

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.
Attachments
Recursive entry in a search box.jpg
Recursive entry in a search box.jpg (144.94 KiB) Viewed 742 times

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

Re: (Recursive entry in a search box)

Post by odklizec » Wed Jun 24, 2015 11:45 am

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? ;)
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

satishmohan
Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Re: (Recursive entry in a search box)

Post by satishmohan » Wed Jun 24, 2015 1:43 pm

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).
Attachments
Recursive.jpg
Recursive.jpg (145.04 KiB) Viewed 734 times
Waldemar_ValidateUsrGrp2.zip
(114.9 KiB) Downloaded 129 times

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

Re: (Recursive entry in a search box)

Post by odklizec » Wed Jun 24, 2015 1:50 pm

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
Setup.png (11.23 KiB) Viewed 732 times
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

satishmohan
Posts: 56
Joined: Wed Jun 10, 2015 4:35 pm

Re: (Recursive entry in a search box)

Post by satishmohan » Wed Jun 24, 2015 4:20 pm

Hi. Issue resolved. Thanks again :)