Run a recording for all items in a drop down list

Class library usage, coding and language questions.
Posts: 23
Joined: Fri Nov 30, 2018 6:03 pm

Run a recording for all items in a drop down list

Post by maamer » Thu Jan 31, 2019 5:37 pm

Hello all,
i ran into a problem. i have a drop down list and i am running my recording (1. click on drop down, 2. click on the item) through data driven with simple data table.
aVwdI-1.png (15.32 KiB) Viewed 731 times
how ever this drop down list is changing with respect to the account i am using in the application. so my DDT is failure. i am thinking to scrape off all the items in a list [] and run my recording for the items in this list. i have something like this

IList<Ranorex.Atag> dropdown = repo.digitalbanking.dropdownitemInfo.CreateAdapters<Ranorex.Atag>();

i want to do something like this.

foreach (Ranorex.Atag item in dropdown){

now, how to bind each item in click action of my variable?. could anyone please help me with that.

Thank you.
(429.69 KiB) Downloaded 33 times

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

Re: Run a recording for all items in a drop down list

Post by odklizec » Thu Jan 31, 2019 7:48 pm


If you mean how to bind a variable in recording started from code, then I’m afraid, there is no such option. Running recordings from code is, in my opinion, a very bad idea. I would rather consider creating/editing data connector from code. Check for example this post, which describes how to create/update a csv data connector from code.
how-to-dynamically-create-test-containe ... tml#p49222
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