Page 1 of 1

Unable to get ListItem value inside of QComboBox

Posted: Tue May 23, 2017 2:56 pm
by ziasim
Hi,

My AUT has front end in Qt framework. I just started to automate some of its features, everything was fine till now. Basically, there is a comobox of Qt flavor which have some list items inside of it. Ranorex identified values inside of Qcombobox as listitems during recording with path as

/container[@processname='ANDDesktop']/?/?/listitem[@text='SEP00155D140E4F (5017)']

So what I am doing making a click to expand combobox and then try to read list items inside of this box using

IList<Ranorex.ListItem> phoneList = repo.Options.ConnectionsOption.SelectPhoneToRemove.Find<Ranorex.ListItem>(".//ListItem");

which worked pretty well in other situations in different projects. But in this case,. it is not reading anything from this box.

I also attached snapshot of this Qt combo box for analysis.

Looking forward for some feedback.

Re: Unable to get ListItem value inside of QComboBox

Posted: Tue May 23, 2017 3:00 pm
by odklizec
Hi,

Could you please upload a snapshot of expanded combo box? You can track the expanded combo by Instant Tracking (Ctrl+Win shortcut). Thanks.

Re: Unable to get ListItem value inside of QComboBox

Posted: Tue May 23, 2017 3:54 pm
by ziasim
odklizec wrote:Hi,

Could you please upload a snapshot of expanded combo box? You can track the expanded combo by Instant Tracking (Ctrl+Win shortcut). Thanks.

Hi,

Instant tracking is not working for me. May be it is due to the fact that the machine on which Ranorex installed is VM and I am accessing it through remote desktop from my laptop.

Though I am using an external keyboard with my laptop but I tried using laptop keyboard but no luck.

Ctrl+T is working on remote computer for normal tracking :shock:

So why not Ctrl+Win key????

Re: Unable to get ListItem value inside of QComboBox

Posted: Wed May 24, 2017 12:24 am
by Support Team
Hello Ziasim,
ziasim wrote: Instant tracking is not working for me. May be it is due to the fact that the machine on which Ranorex installed is VM
I have often seen remote connections not push the windows key or other key combinations (ie ALT+CTRL+DELETE) to the VM. There may be an option in the remote connection software you are using.

Alternatively, you can add a 'Create Snapshot' action right after the 'Click' action that expands the drop box.

Cheers,
Ned

Re: Unable to get ListItem value inside of QComboBox

Posted: Wed May 24, 2017 6:48 am
by ziasim
Support Team wrote:Hello Ziasim,
Alternatively, you can add a 'Create Snapshot' action right after the 'Click' action that expands the drop box.

So I added an action to create a snapshot right after expanding the combo box using click action which is attached. BTW, I didn't see any difference between the first snapshot I attached in my first post and the new one which I have while combo box is expanded.

Anyway, I attached new screen shot for analysis. Looking for some feedback as I am struck on this point now.

Re: Unable to get ListItem value inside of QComboBox

Posted: Wed May 24, 2017 7:15 am
by odklizec
Hi,

The snapshot in your initial post appears to be exactly the same? Are you sure you attached the correct one? I think it's wrong one, because the combo box is collapsed.

Re: Unable to get ListItem value inside of QComboBox

Posted: Wed May 24, 2017 8:35 am
by ziasim
odklizec wrote:Hi,

The snapshot in your initial post appears to be exactly the same? Are you sure you attached the correct one? I think it's wrong one, because the combo box is collapsed.

No, I had attached new snapshot generated by Ranorex after expanding combo box drop down. But, yes it is the same as I had attached with my first post. I don't have any explanation for this :(

What I did now, I captured one of the list item from this drop down using recording and then created a snapshot for this list item element and got a complete tree as you can see in attached snapshot.

But the problem is now when I try to add 'QComboBoxListView' type of item in repository from this snapshot because it is holding all the available list items, nothing is added in repository :shock: :shock: I also tried to add top node in this tree which is a container 'comboDropdown' with its child items but same result. Ranorex pretending that it has been added those elements in repository but upon looking, no element has been added the repository.

May be using instant tracking can help in my situation but its not working due to VM machine environment :?

Not sure what should I do now???

Re: Unable to get ListItem value inside of QComboBox

Posted: Wed May 24, 2017 2:43 pm
by ziasim
Hi,

I figured to track and include correct element in repository from where I can access all list items inside of this combo drop down using deactivating/activating tracking. I added the 'ComboBoxListView' container item which holds all the list items by disabling/enabling tracking and then added these elements to repository.

Surprisingly, the element holding list items is not inside of combo box drop down but if I look in AUT, it looks like it is inside of this drop down as shown in attached image.

Anyway problem resolved and now I can move forward :)