This is a migrated thread and some comments may be shown as answers.

Silverlight Datagrid row count gives wrong value on playback - ok during record

1 Answer 60 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Shashi
Top achievements
Rank 1
Shashi asked on 16 Jun 2011, 12:22 AM
Hello,

I have encountered an issue while writing a test for a page in our app which has a Silverlight Datagrid. 

This Datagrid shows the results of a user search operation.  The test needs to do something if the Search operation fails (i.e. no results are returned).  I recorded the steps to create the condition where the grid was empty (no users found) and then recorded the following statement using Datagrid's element menu:

Verify: 'DataGridUserProfileListDatagrid''s row count 'Equal' '0'

However, when I played it back, the above check failed even when the grid was empty.  The log file showed the following for the Verify step:

'6/15/2011 7:10:28 PM' - 'Pass' : 17. Click ButtonSearchButton
'6/15/2011 7:10:29 PM' - 'Fail' : 18. Verify: 'DataGridUserProfileListDatagrid''s row count 'Equal' '0'.
------------------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Property did not satisfy constraint (24 Equal 0)

...
.
24 is the total number of users in the system in our test environment.

....24 is the total number of users in the system in our test environment.
Note that the statement above is as originally recorded i.e.  row count displayed in the Verify row count command in the element menu of the DataGrid was 0 (which is as expected).  

I also verified that the DataGridRowsPresenter node in the DOM of the DataGrid had no children - both during recording and on playback (see attached screen shot for the version on playback).

Is this a known issue?  If not, any ideas on what might be the problem?

I have implemented a workaround that seems to work (verify existence of the first row of data) - but it would be nice if the row count feature worked (I might want to use it in other tests).

I am using Version 2010.R3 and unfortunately cannot upgrade to the 2011 version right now (tests do not run on our desktop environment).

Your help would be much appreciated,

Thanks,
Shashi

1 Answer, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 21 Jun 2011, 12:07 PM
Hi Shashi,

Thanks for writing.

Do you get the issue if you change the Verify to Wait step? Just right-click the step and choose to change the role to Wait instead.

On external update (like button updating some other control) there's a need of refresh of the object kept in the test. The Wait operation does refresh the elements visual tree internally so that could do the trick.

Please let us know if this resolves the problem for you. Thanks!

Best wishes,
Konstantin Petkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
General Discussions
Asked by
Shashi
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Share this question
or