Unable to automate a selected item from combobox

Experiences, small talk, and other automation gossip.
pala
Posts: 2
Joined: Mon Dec 31, 2018 6:10 pm

Unable to automate a selected item from combobox

Post by pala » Mon Dec 31, 2018 6:40 pm

Hi,

I need to select an item from a combo box in order to write it into a excel sheet.but i didn't found any automation id for that particular combo box in Ranorex spy.i didn't found any related method in user code module.Please share your ideas and suggestions.

Regards,
Sekhar

User avatar
Vega
Posts: 129
Joined: Mon Jul 11, 2016 2:15 pm

Re: Unable to automate a selected item from combobox

Post by Vega » Mon Dec 31, 2018 11:15 pm

Would you be able to share a Ranorex Snapshot of the controls you are having trouble with? You can learn to create one here:

https://www.ranorex.com/help/latest/han ... -snapshot/

pala
Posts: 2
Joined: Mon Dec 31, 2018 6:10 pm

Re: Unable to automate a selected item from combobox

Post by pala » Fri Jan 04, 2019 1:15 pm

I need to select one of the item from the combobox and in turn write it into an excel sheet
Attachments
@401_Ventsdomescombobox.rxsnp
(112.3 KiB) Downloaded 16 times

McTurtle
Posts: 227
Joined: Thu Feb 23, 2017 10:37 am
Location: Benedikt, Slovenia

Re: Unable to automate a selected item from combobox

Post by McTurtle » Wed Jan 09, 2019 12:24 pm

Hi Pala,

Were you able to get the caption-property of the Text-elements which is a child of the ListItem in your application? This is probably what you need.
caption.png
caption.png (12.16 KiB) Viewed 146 times
If you want to write this information to an Excel file, then you could do it similar to this: How to write some data to excel file(.xlsx)
However, writing to a csv file is much easier. Can you maybe write to a csv file? For that you can follow this post: Writing data into CSV file in C#

Anyway, you will have to program this step in Ranorex as there is no GUI way to do it.

Regards,
McTurtle

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 4532
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to automate a selected item from combobox

Post by odklizec » Wed Jan 09, 2019 12:37 pm

Hi,

Aside to what McTurtle suggested, the snapshot you posted, complains about limited WPF identification capabilities, caused by using UIA plugin. It's better to use native WPF plugin, which may provide much more details about UI elements, including combo box items.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration