Select ListItem from Excel data

Ranorex Spy, Recorder, and Studio.
romainb25
Posts: 15
Joined: Mon May 09, 2016 2:31 pm

Select ListItem from Excel data

Post by romainb25 » Thu Jun 16, 2016 11:15 am

Hi community,

I have a ListItem with some items inside : ListItemBOOK,ListItemBOOK2,ListItemBOOK3,ListItemBOOK4(see picture below)

I have an excel file with a type column.
When i launch the test case, i want to get type in my excel column and select it in my ListItem, in my script i want something like this:

repo.FormOperation.Panel21. <<type?>> .Click("35;10");
Dessin sans titre.png
Dessin sans titre.png (16.12 KiB) Viewed 572 times
How can i do this?

thanks
romainb25

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

Re: Select ListItem from Excel data

Post by odklizec » Thu Jun 16, 2016 11:31 am

Hi,

Any chance to post the excel file in question? It would be much easier to suggest a solution with actually working sample file, instead of screenshot.
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

romainb25
Posts: 15
Joined: Mon May 09, 2016 2:31 pm

Re: Select ListItem from Excel data

Post by romainb25 » Thu Jun 16, 2016 12:54 pm

I can't upload a file with xls extension in this post.

My Excel column are bound to local variables
pb5.png
pb5.png (19.16 KiB) Viewed 562 times
In my script i can add variable in an edit text like this:
repo.Form.Text001.PressKeys(quantite);

But i can't select any element in my list :
repo.Form.ListView01. type? .Click("53;10");

Any idea?

thanks

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Select ListItem from Excel data

Post by Support Team » Mon Jun 20, 2016 2:31 pm

Hello romainb25,

Thank you for the additional information.

The problem is that you would need a Ranorex adapter element in order to use e.g., the Click()-method, but you just receive a "string"-value from your Excel sheet.

Sample:
UserCodeVariable.png
UserCodeVariable.png (4 KiB) Viewed 538 times
"varButtonName" is the recording variable which is bound to the Excel sheet.

Hope this information helps.

Sincerely,
Robert
.
Image