Datadriven testing for selecting dropdown list value

Ranorex Spy, Recorder, and Studio.
vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Datadriven testing for selecting dropdown list value

Post by vnet » Thu Sep 27, 2012 9:17 pm

I am using datadriven testing and using csv file for passing my data. My problem is one of the values I am suppose to select is from a dropdown list and rest are input text field. I am not sure how to do this using data driven approach. I can record the entire test by selecting value and entering data but want to avoid it. Any suggestions?

Thanks,
vnet

User avatar
IanF
Posts: 60
Joined: Thu May 24, 2012 12:37 am
Location: Brisbane, Australia
Contact:

Re: Datadriven testing for selecting dropdown list value

Post by IanF » Fri Sep 28, 2012 12:18 am

What happens if you use the Presskeys method? This is what I use for dropdowns and it works.
Ian Fraser

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: Datadriven testing for selecting dropdown list value

Post by vnet » Fri Sep 28, 2012 12:47 am

Did you mean keysequence? I can't since my dropdown is 'readonly' (meaning I can't type in the values in the list. What worked for me is setValue'sSelectItemIndex(I pass the index in the csv file) and keysequence return.

Now I have new problem, there are scenarios where I dont select anything from the dropdown (I have 2 operators and 2 numbers to get range). I am not sure what to pass in the csv file for no value (I tried null just ; but nothing works). Any help would be appreciated.

vnet
Posts: 29
Joined: Tue Jul 24, 2012 8:13 pm

Re: Datadriven testing for selecting dropdown list value

Post by vnet » Fri Sep 28, 2012 12:55 am

Never mind I got the solution. Since I was acessing my drop down based on index, using -1 in the csv did the trick :)