How to make parameterized method got listItem

Ranorex Spy, Recorder, and Studio.
Priyanshu
Posts: 30
Joined: Wed May 22, 2019 5:48 am

How to make parameterized method got listItem

Post by Priyanshu » Tue Jun 09, 2020 8:58 pm

Hi Team,

I have attached a snapshot , I want help to make parameterized function.
I have got a List contains number of listItems , I want to make these listItem to be passed as parameter .
Problem is when I am passing listItem as parameter it goes and checks if the item is visible but since its a big list and item is not visisble it gets failed as start only.
Attachments
ListItem.zip
(16.25 KiB) Downloaded 1 time

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

Re: How to make parameterized method got listItem

Post by odklizec » Wed Jun 10, 2020 6:48 am

Hi,

I'm not quite sure what exactly you want to achieve with the list in question, but to be able to enumerate the listitems, and eventually obtain their attributes, you will have to create a list of adapters, as described for example here:
https://www.ranorex.com/forum/unable-to ... tml#p58031

Basically, you must create a repo element, pointing to entire list of elements and assign that repo to the method form above example (or similar/modified method)...

Code: Select all

/list[@class='ComboLBox' and @processname='SymPathy']/listitem
This should create an enumerable list of items, which you can enumerate and read properties of each single listitem. 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