RepoItem iteration finding value (usercode)

Best practices, code snippets for common functionality, examples, and guidelines.
oli129
Posts: 1
Joined: Wed Nov 06, 2019 1:36 pm

RepoItem iteration finding value (usercode)

Post by oli129 » Wed Nov 06, 2019 2:08 pm

Hello!

I have been using ranorex for quite a while, however only have written a few basic user codes. I came accross the following screen:
table.JPG
table.JPG (28.26 KiB) Viewed 34 times
which is developed in Oracle Forms (...I know...)

This list automatically gets filled with a date value in the first column, after pressing a green checkmark previously. The date, that gets filled is always the first day of the next month. So, if I pressed the button on 28th Oct, then the date will be 1st Nov.

What I would like to do is to validate this date on the repoItem and if found, then click in the cell.
public static void TryFindColumnItem(RepoItemInfo columnInfo, string dateVal)
It does look like a table, however it is not. The repoitem is:
//text[@accessiblename='fromDate']
So, for every cell you see in the first column, is the same accessible name.

If I were to take the item's index value, it would start from
//text[27]
table2.jpg
table2.jpg (41.98 KiB) Viewed 34 times
This list gets dynamically extended as it fills up.

My ultimate goal is, that I would like to find the date in the first column, that I set in the dateVal, and then click on it.

Could you please help me with such a user code, or provide a similar reference to this? I would highly appreciate it!

And again, it is not a usual table, so it is not consistent enough to do a simple iteration, so far I am concerned.

Thank you very much!
Oliver

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

Re: RepoItem iteration finding value (usercode)

Post by odklizec » Thu Nov 07, 2019 9:29 pm

Hi,

Please upload a Ranorex snapshot (NOT screenshot) of the problematic table? Without, at very least, snapshot, it’s very hard (if not impossible) to suggest something reliable.
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