Ranorex

Description returns null arbitrarily on ListView32 rows?

 
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet
View previous topic :: View next topic  
Author Message
ariel.levi



Joined: 12 Feb 2008
Posts: 1

PostPosted: Tue Feb 12, 2008 7:34 pm    Post subject: Description returns null arbitrarily on ListView32 rows?
Hello,

I'm in the process of trying out the RanorexNet library for a project I'm about to start. The experience has been pleasant all in all, but one strange thing that I'm struggling with is that the Description property of objects of type Element which represent rows in a regular windows ListView32 control return null some of the time.

Out of 100 calls to Description on the same element, for example, 5 or 10 times null may be returned. Certain rows may return null consistently for a short while, may return null forever, and may return a meaningful string after one attempt. Voodoo behavior.

The code goes like this:
Code: click into code to enlarge

m_ListView = myForm.FindClassName("SysListView32");

Element crossRateListElement = m_ListView.Element;

Element[] gridRows = crossRateListElement.FindChildren(Role.ListItem);

foreach (Element currentRow in gridRows)
{
string name = currentRow.Name;
string description = currentRow.Description;

if (description != null)
{
// Use 'description' to extract data
}


I got around this by inserting the 'description != null' check, but now I have reliability problems instead of crashes, and it's certainly not much better.

The problem may be related to one of the following:
1. The code runs runs on a virtual Windows server, meaning the only GUI which is present is the remote desktop based GUI which I see in my own computer.
2. Some list items are out of view, meaning scrolling is required to see them.

Unfortunately, I consider this a major problem since it prevents the library from filling some acute reliability requirements.

Are these issues known? Have they been discussed before? Is there any possibility that the full version will be better at getting at the problem, or is its internal implementation completely similar to that of the evaluation version?

Thanks in advance!
Back to top
View user's profile Send private message
Support Team
Site Admin


Joined: 07 Jul 2006
Posts: 257

PostPosted: Wed Feb 13, 2008 3:52 pm    Post subject:
If you have many items in your ListView, this problem might be the result of a bug in version 1.3.1 discussed in following thread:
http://www.ranorex.com/forum/problems-automating-infragistics-datagrid -control-t340.html
If the caching algorithm does not find the element, null is returned.

I just tried to get the Description property of a few ListItems in a loop and that worked perfectly. Could you please try to get the Description property of a single element in a loop and report if the problem arises that way?

If you run your Ranorex code via Remote Desktop, be sure that the Remote Desktop window is open and visible all the time (windows seems to remove the desktop at the remote machine if the Remote Desktop window at the client is invisible/closed). It's usually safer to use VNC.

If the caching bug is not the cause of the problem (please try to read Description of single element in loop), there might be some problem with the underlying control. Please send us information about the ListView you use!

Regards,
Alex
Ranorex Support Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Ranorex Forum Index -> RanorexNet All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum