I cannot detect listitems in Excel's combobox. I'm talking about Font combobox with Arial, Courier, Times New Roman list items... I always get same RxPath for all list items with Ranorex spy.
In Excel 2007 this works normal (every list item has unique RxPath).
Do you know how to solve this problem?
Best regards,
Vladimir Vajda
List items in Excel 2003 combobox
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List items in Excel 2003 combobox
Hi,
Regards,
Peter
Ranorex Team
These two apps are completely different and therefore you have the difference in the object recognition. Have you tried to use the GDI Plug-In to automate Excel 2003. I think with this plug-in you should be able to get the elements of the toolbar.WajdaW wrote:Do you know how to solve this problem?
Regards,
Peter
Ranorex Team
Re: List items in Excel 2003 combobox
Thanks Roland, I didn't know about this plug in. I added EXCEL processname to GDI capture list from context menu and now our combobox list can be found and our problem is solved.
Interesting, font combobox list (arial, courier, verdana, etc..) still cannot be found.
Interesting, font combobox list (arial, courier, verdana, etc..) still cannot be found.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List items in Excel 2003 combobox
Hi,
Please could you post us a Ranorex Snapshot of Excel 2003?
How to create a Ranorex Snapshot
Regards,
Peter
Ranorex Team
Please could you post us a Ranorex Snapshot of Excel 2003?
How to create a Ranorex Snapshot
Regards,
Peter
Ranorex Team
Re: List items in Excel 2003 combobox
Sure, snapshot is here: http://www.megaupload.com/?d=5YIURK5S
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List items in Excel 2003 combobox
Hi,
According to your snapshot the RxPath for the Font Combo Box is
Regards,
Peter
Ranorex Team
According to your snapshot the RxPath for the Font Combo Box is
/form[@processname='EXCEL']/element[@class='EXCEL2' and @instance='0']/container[@caption='Formatting']/toolbar/combobox[@accessiblename='Font:']Please open spy and try this RxPath.
Regards,
Peter
Ranorex Team
Re: List items in Excel 2003 combobox
Thanks, it works. 
But now I have another problem. I managed to identify our comboboxes by Raw Tex plugin, but we have situation where depending on Office language (English or Deutsch) our combobox items have different names.
For example: List item have either Accept or Akzeptieren rawtext attribute value depending on language.
We want to have the same paths for any language.
For example: List item should have path like this someElement[@ID='someID'] and to be language independent.
Is there a way to identify those items by some ID or some other way in order to use same paths for any language?

But now I have another problem. I managed to identify our comboboxes by Raw Tex plugin, but we have situation where depending on Office language (English or Deutsch) our combobox items have different names.
For example: List item have either Accept or Akzeptieren rawtext attribute value depending on language.
We want to have the same paths for any language.
For example: List item should have path like this someElement[@ID='someID'] and to be language independent.
Is there a way to identify those items by some ID or some other way in order to use same paths for any language?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List items in Excel 2003 combobox
Hello Vladimir,
Have a look at the attributes available for the combobox item. If there are others available to identify the element then you can try those. Else consider using variables:
In the Ranorex Studio 3.0 Repository you can use the path editor and replace a value by a variable.
In the test suite at the test case line with the recording using this repository you can provide the actual language specific name.
If do manual coding then you can concatenate the path in your code using the language specific value.
Regards,
Roland
Ranorex Support Team
Have a look at the attributes available for the combobox item. If there are others available to identify the element then you can try those. Else consider using variables:
In the Ranorex Studio 3.0 Repository you can use the path editor and replace a value by a variable.
In the test suite at the test case line with the recording using this repository you can provide the actual language specific name.
If do manual coding then you can concatenate the path in your code using the language specific value.
Regards,
Roland
Ranorex Support Team
Re: List items in Excel 2003 combobox
Is there a way to use RxPath variables with code generation?
For example: I have some path with variable in it, and I want to generate C# code and to have this element to be assessed not as property, but as a method with parameter where this parameter is actually RxPath variable.
Path:
body/div[@id='isc_0']/div/div[@id='isc_2']/div[@id='isc_3']/table/tbody/tr/td[@innertext=$presentation]
And I want to access it like this: SomeRxRepo.Instance.PresentationElement("my value").Click();
not like this: SomeRxRepo.Instance.Presentation.Click();
I couldn't manage this.
Is there a way to provide such functionality with code generation or I just need to do this manually?
For example: I have some path with variable in it, and I want to generate C# code and to have this element to be assessed not as property, but as a method with parameter where this parameter is actually RxPath variable.
Path:
body/div[@id='isc_0']/div/div[@id='isc_2']/div[@id='isc_3']/table/tbody/tr/td[@innertext=$presentation]
And I want to access it like this: SomeRxRepo.Instance.PresentationElement("my value").Click();
not like this: SomeRxRepo.Instance.Presentation.Click();
I couldn't manage this.
Is there a way to provide such functionality with code generation or I just need to do this manually?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: List items in Excel 2003 combobox
Hi,
have a look at following chapter in our user guide which will explain exactly how to use variables within code modules:
http://www.ranorex.com/support/user-gui ... html#c3112
Kind regards,
Tobias
Support Team
have a look at following chapter in our user guide which will explain exactly how to use variables within code modules:
http://www.ranorex.com/support/user-gui ... html#c3112
Kind regards,
Tobias
Support Team