Several Buttons with same Accesible Name

Ask general questions here.
alexcruzvb
Posts: 7
Joined: Mon Feb 28, 2011 5:31 pm

Several Buttons with same Accesible Name

Post by alexcruzvb » Fri Mar 18, 2011 8:26 pm

Hi,
Im trying to run a test where the screen that I am testing has several buttons with elipsis.
When clicked they bring up a small window. They all have the same accesible name "..." and the first button is found and clicked ok, but does not find the second button. The following is the Path to both controls.
The first one it finds, the second one it does not.

element[@controlname='panel1']/element[@controlname='tabControl1']/element/element[@controlname='btnCustUIC']/button[@accessiblename='...']

element[@controlname='panel1']/element[@controlname='tabControl1']/element/element[@controlname='' and @instance='10']/element[@controlname='btnEllipsis']/button[@accessiblename='...']

Any help would be appreciated.
Alex

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Several Buttons with same Accesible Name

Post by Support Team » Fri Mar 18, 2011 9:35 pm

Hello Alex,

the two paths are not the same.

If two paths are the same, which would also mean that one path leads to more elements,
then you can use Find and you get a list, which you can choose from via index:

Code: Select all

Host.Local.Find("/full/path/here")[index here];
If you have a relative path that cannot be found it might be that you start from a path that was not unique and of which the first was taken when instanciating an adapter class.

In general when a path is not found try to find out where in the path Ranorex is stuck by successively removing the last entry in the path.

Regards,
Roland
Ranorex Support Team

alexcruzvb
Posts: 7
Joined: Mon Feb 28, 2011 5:31 pm

Re: Several Buttons with same Accesible Name

Post by alexcruzvb » Fri Mar 18, 2011 10:09 pm

Thanks, I will try that.
Alex