I am developing some addin from Office using Addin Express. I just wonder if there is a way to assign some kind of id to my components so I can identify them uniquely?
I found property Id on those buttons, but it seems that Ranorex cannot recognize it. I used earlier AccessibleName attribute, but it seems that this attribute is changing when I change text of button. I'm testing my addin on two machines (with English and with German) so localization differs and hence Ranorex paths.
What I was able to do is to locate buttons based on their index in container, that gives me language independence, but every time layout is changed I'll need to update paths. I would like to make it place independent too.
Any suggestions?
Best regards,
Vladimir Vajda
Identifying ribbon buttons in excel
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Identifying ribbon buttons in excel
Hello,
Unfortunately we have no experiences with Addin Express, but the identification of the elements depends on the technology which is used, so it would be helpful if you could send us a Ranorex snapshot file and more detailed information about the technology which is used? The following link shows how to create a snapshot file:Creating Ranorex Snapshot Files
Regards,
Bernhard
Ranorex Support Team
Unfortunately we have no experiences with Addin Express, but the identification of the elements depends on the technology which is used, so it would be helpful if you could send us a Ranorex snapshot file and more detailed information about the technology which is used? The following link shows how to create a snapshot file:Creating Ranorex Snapshot Files
Regards,
Bernhard
Ranorex Support Team
Re: Identifying ribbon buttons in excel
Here is snapshot.
Here are some documentation about technology used:
http://www.add-in-express.com/files/docs/adxnet7.pdf
It is basically, an Excel COM add-in.
Here are some documentation about technology used:
http://www.add-in-express.com/files/docs/adxnet7.pdf
It is basically, an Excel COM add-in.
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Identifying ribbon buttons in excel
Hello,
Thanks for the snapshot!
Did you already try to use regular expressions in your RxPath or a logic OR in order to identify the elements in German and English?
Here is a sample: button[@accessiblename='Synchronize' or @accessiblename='Synchronisieren']
and here is a link to the UserGuide section about the RxPath, if think this page is very informative: RanoreXPath.
Is this a solution for you?
Regards,
Markus
Ranorex Support Team
Thanks for the snapshot!
Did you already try to use regular expressions in your RxPath or a logic OR in order to identify the elements in German and English?
Here is a sample: button[@accessiblename='Synchronize' or @accessiblename='Synchronisieren']
and here is a link to the UserGuide section about the RxPath, if think this page is very informative: RanoreXPath.
Is this a solution for you?
Regards,
Markus
Ranorex Support Team
Re: Identifying ribbon buttons in excel
Sorry for late reply, I have postponed this task as I have some other which have higher priority.
Yes I know about this option. But generally, our names could change. Let say, in one version title can be "Synchronize", in other "Synchronization", or we decide to support one more language and to test it on one more machine with that particular language and so on. I was wondering if I could make it maybe more independent on title, use some id I've embedded in code. If there is no option, I'll need to do it as you have proposed, with or operator.
Regards,
Vladimir
Yes I know about this option. But generally, our names could change. Let say, in one version title can be "Synchronize", in other "Synchronization", or we decide to support one more language and to test it on one more machine with that particular language and so on. I was wondering if I could make it maybe more independent on title, use some id I've embedded in code. If there is no option, I'll need to do it as you have proposed, with or operator.
Regards,
Vladimir
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Identifying ribbon buttons in excel
Hi,
No problem.
Does the "accessibledescription" attribute also change or would the childindex be a valid attribute for you?
For the sync button: /form[@processname='EXCEL']/element/container/element/element/container/container/container/container/toolbar[@accessiblename='Fact Operations']/button[@childindex='0'].
Regards,
Markus
Ranorex Support Team
No problem.
Does the "accessibledescription" attribute also change or would the childindex be a valid attribute for you?
For the sync button: /form[@processname='EXCEL']/element/container/element/element/container/container/container/container/toolbar[@accessiblename='Fact Operations']/button[@childindex='0'].
Regards,
Markus
Ranorex Support Team