Page 1 of 1

Select ListItem from Excel data

Posted: Thu Jun 16, 2016 11:15 am
by romainb25
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
How can i do this?

thanks
romainb25

Re: Select ListItem from Excel data

Posted: Thu Jun 16, 2016 11:31 am
by odklizec
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.

Re: Select ListItem from Excel data

Posted: Thu Jun 16, 2016 12:54 pm
by romainb25
I can't upload a file with xls extension in this post.

My Excel column are bound to local variables
pb5.png
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

Re: Select ListItem from Excel data

Posted: Mon Jun 20, 2016 2:31 pm
by Support Team
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
"varButtonName" is the recording variable which is bound to the Excel sheet.

Hope this information helps.

Sincerely,
Robert