Evaluation - Exception when clicking DevExpress Grid Cells

Ask general questions here.
User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Evaluation - Exception when clicking DevExpress Grid Cells

Post by Ciege » Tue Oct 21, 2008 12:05 am

I downloaded the DevExpress XtraGrid features Demo (C#) application (v8.2) and am evaluating Ranorex (v1.5.1) against it. I am doing a simple test that is throwing an exception while using VS 2008 C#. This test is just a simple evaluation I am using to verify Ranorex (and/or other automation utilities) are able to see and interact with DevExpress grid controls.

Here is the code:
for(int i = 1;i<=100;i++)
{
element = controlElement.FindChild(Role.Cell, "Unit Price row " + i);
Mouse.ClickElement(element,MouseButtonType.LeftButton);
}

The grid is displaying 20 rows of 2000+ rows.

The Ranorex code is correctly clicking rows 1 - 20 but when the code to click row 21 is executed I get an exception "Message='The specified command could not be executed.'"

It would seem that the Ranorex code is not "smart" enough to scroll the grid to get to the next row to click that item? Am I supposed to tell Ranorex to scroll the grid when the next item to click is not displayed? Is there a way to tell Ranorex to do this automatically or do I have to programmatically determine this myself?

Thanks,
Chris...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Tue Oct 21, 2008 9:33 am

Hi Chris,

The current version version (V1.5) of Ranorex does not support any auto-scroll feature out of the box. The new version (Ranorex V2.0) will provide more convenience in making invisible UI elements visible.

But there is also workaround for your XtraGrid control in the current version. Please try to call the Ranorex.Element method 'DoDefaultAction'. Calling this method causes the element to get the current focus and ensures the visibility automatically.

Maybe this could work for you.

best regards,
Christoph
Ranorex Support Team

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Post by Ciege » Tue Oct 21, 2008 6:14 pm

OK, the DoDefaultAction method worked for this scenario.

Is it possible to get a trail of the v2.0 of Ranorex? Since I am evaluating packages now I guess I should be evaluating the best of breed from each company.

Also, can v2.0 be installed on the same machine as my trial v1.5 or does v1.5 need to be uninstalled first?

Thanks,
Chris...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Wed Oct 22, 2008 2:01 pm

Hi Chris,

The Ranorex V2.0 preview is now available under http://www.ranorex.com/download.html

You do not need to uninstall Ranorex V1.5 to run Ranorex V2.0. Both versions may be installed side-by-side.

best regards,

Christoph
Ranorex Support Team