Page 1 of 1

cannot doubleclick on a list item

Posted: Thu Jun 11, 2009 8:43 pm
by chris
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();

Posted: Fri Jun 12, 2009 12:24 am
by chris
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).

Posted: Fri Jun 12, 2009 8:42 am
by Support Team
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

Posted: Fri Jun 12, 2009 4:46 pm
by chris
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.

Posted: Mon Jun 15, 2009 3:17 pm
by Support Team
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

Re: cannot doubleclick on a list item

Posted: Mon Jun 15, 2009 11:45 pm
by chris
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.