Combining index with another element attribute

Ask general questions here.
Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Combining index with another element attribute

Post by Mayra » Tue Feb 11, 2014 8:13 pm

Hi,

This must be a simple question, still I am not able to get it working in the path.Any help would be appreciated.
I need to combine index with another attribute, when using the ranorex spy, I can either choose the index or other attribute from the list. I also tried editing as follows but I was not successful.
I tried://tag[@class='highcharts-axis' and @idex='1'] and it is not able to find the object. It does if I take the index out or if I take the class out.

Thanks.

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

Re: Combining index with another element attribute

Post by krstcs » Tue Feb 11, 2014 8:34 pm

Try this:

//tag[@class='highcharts-axis'][1]

Put the index in its own bracket.
Shortcuts usually aren't...

Mayra
Posts: 68
Joined: Mon Dec 16, 2013 5:27 am

Re: Combining index with another element attribute

Post by Mayra » Tue Feb 18, 2014 10:15 pm

thanks