Unable to get ListItem value inside of QComboBox

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Unable to get ListItem value inside of QComboBox

Post by ziasim » Tue May 23, 2017 2:56 pm

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.
You do not have the required permissions to view the files attached to this post.

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

Re: Unable to get ListItem value inside of QComboBox

Post by odklizec » Tue May 23, 2017 3:00 pm

Hi,

Could you please upload a snapshot of expanded combo box? You can track the expanded combo by Instant Tracking (Ctrl+Win shortcut). Thanks.
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

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Unable to get ListItem value inside of QComboBox

Post by ziasim » Tue May 23, 2017 3:54 pm

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????

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

Re: Unable to get ListItem value inside of QComboBox

Post by Support Team » Wed May 24, 2017 12:24 am

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

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Unable to get ListItem value inside of QComboBox

Post by ziasim » Wed May 24, 2017 6:48 am

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.

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

Re: Unable to get ListItem value inside of QComboBox

Post by odklizec » Wed May 24, 2017 7:15 am

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.
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

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Unable to get ListItem value inside of QComboBox

Post by ziasim » Wed May 24, 2017 8:35 am

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???
You do not have the required permissions to view the files attached to this post.

ziasim
Posts: 52
Joined: Wed Dec 16, 2015 4:03 pm

Re: Unable to get ListItem value inside of QComboBox

Post by ziasim » Wed May 24, 2017 2:43 pm

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 :)
You do not have the required permissions to view the files attached to this post.