cannot doubleclick on a list item

Ask general questions here.
chris
Posts: 17
Joined: Fri Mar 27, 2009 6:10 pm

cannot doubleclick on a list item

Post by chris » Thu Jun 11, 2009 8:43 pm

I am having trouble double clicking (or clicking) on a ListItem from a SysListView32 object. The weird thing is that it only happens when the item has a name that consists of only numbers and periods (2.2.0, 2.0.0, etc.). I have tried using both a relative and absolute RxPath, but that does not make a difference. Any ideas what might be the problem? Is there anything I should try to debug?
Thanks.
Here is a code sample:

Code: Select all

ListItem isoFolder = openIsoForm.FindSingle<ListItem>(new RxPath("/form[@title~'^Virtual\\ CloneDrive\\ Drive\\ ']/container/*/listitem[@text='2.2.0']"),
                new Duration(9000));
isoFolder.EnsureVisible();
isoFolder.Click();

chris
Posts: 17
Joined: Fri Mar 27, 2009 6:10 pm

Post by chris » Fri Jun 12, 2009 12:24 am

By the way, the object does get initialized. I put a break in the code right after I create the new list item (isoFolder in the code) and I can see that it has the right ListItem and it appears to have the right values (as far as I can tell).

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

Post by Support Team » Fri Jun 12, 2009 8:42 am

Hello chris,
I can`t reproduce that issue. I suppose you want to automate the File Explorer.
Which Ranorex Version (REVISION) do you use?

Regards,
Christian
Ranorex Support Team

chris
Posts: 17
Joined: Fri Mar 27, 2009 6:10 pm

Post by chris » Fri Jun 12, 2009 4:46 pm

I am using 2.1.0.6243 on Windows 2003 R2 EE sp2.
I am trying to automate mounting an iso from a SMB file share with a program called Virtual CloneDrive. Here is more of the code:

Code: Select all

foreach (string pathItem in pathToIso)
                {
                    ListItem item = openFileDialoge.FindSingle<ListItem>(new RxPath(".//listitem[@text~'" + pathItem + "']"),
                        new Duration(9000));
                    item.EnsureVisible();
                    item.DoubleClick();
                }
Thanks.

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

Post by Support Team » Mon Jun 15, 2009 3:17 pm

Dear Chris!
I tested your case actually with the same Ranorex version but i didn't find any trouble.
Could you please post the value of pathItem, which you generate in collection.
You can also try to not use regular expressions in your path.

Regards,
Mohsen
Ranorex Support Team

chris
Posts: 17
Joined: Fri Mar 27, 2009 6:10 pm

Re: cannot doubleclick on a list item

Post by chris » Mon Jun 15, 2009 11:45 pm

This appears to be a problem with the location it is clicking on. When I changed the DoubleClick() method to include a location like this:

Code: Select all

item.DoubleClick(new Location(4,4));

It works just fine.
Thanks for the quick responses.