Repository element indexing uses 1-based index vs. 0-based

Bug reports.
krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Repository element indexing uses 1-based index vs. 0-based

Post by krstcs » Thu Dec 27, 2012 4:58 pm

The Repository indexing system uses a 1-based index, but all other .NET structures use 0-based.

This causes issues when trying to use the indexes and requires the user to know that there needs to be a conversion.

The Repository index should be changed to match standard .NET conventions. All indexing should be based on the same value.
Shortcuts usually aren't...

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

Re: Repository element indexing uses 1-based index vs. 0-based

Post by Support Team » Fri Dec 28, 2012 12:05 pm

Hello,

Could you please describe which index do you mean?
Do you mean the index attribute in the RanoreXPath of a repository item?

Regards,
Markus (T)
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Repository element indexing uses 1-based index vs. 0-based

Post by krstcs » Wed Jan 02, 2013 7:54 pm

Marcus,

Yes, that is correct. The RxPath indexing starts at 1, but all other indexes, including container child indexes, start at 0, per .NET standards.
Shortcuts usually aren't...

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

Re: Repository element indexing uses 1-based index vs. 0-based

Post by Support Team » Thu Jan 03, 2013 2:37 pm

Hello,

This is because the RxPath is a subset of XPath and according to the W3C standard the index is 1 based (XPath Syntax).

Regards,
Markus
.
Image

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Repository element indexing uses 1-based index vs. 0-based

Post by krstcs » Fri Jan 04, 2013 2:20 pm

OK, that explains it.

Thanks Markus.
Shortcuts usually aren't...

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

Re: Repository element indexing uses 1-based index vs. 0-based

Post by Support Team » Fri Jan 04, 2013 2:51 pm

Your're welcome!

Regards,
Markus
.
Image