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

Not recognizing a data grid

4 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Raji
Top achievements
Rank 1
Raji asked on 17 Nov 2011, 10:23 AM

Hi ,

I tried to record a data grid in my application.But the tool is not recognizing the same.Instead it gets recognized as a table. Kindly suggest me how could I proceed with my testing for data grid.



Thanks,
Raji Vijay

4 Answers, 1 is accepted

Sort by
0
Raji
Top achievements
Rank 1
answered on 21 Nov 2011, 05:57 AM

It will be highly appreciated if some one take their time to help me in this.

Thanks in advance
Raji Vijay
0
Stoich
Telerik team
answered on 21 Nov 2011, 04:36 PM
Hello Raji,
check out this article:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/recording-tests/translators.aspx

The translators that this article talks about can cause Test Studio to recognize one control as a different control. That being said I'm going to need additional info in order to analyze the issue thoroughly. Please go ahead and send some additional data:
What kind of control is it exactly?
How does it look when you examine it in the DOM Explorer?

All the best,
Stoich
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Raji
Top achievements
Rank 1
answered on 22 Nov 2011, 08:28 AM

Hi Stoich

Please find a sample solution attached since i couldn't share you the one which i tried out.The exact control is a data grid which is been taken as table in the DOM explorer.

Thanks,
Raji

0
Stoich
Telerik team
answered on 25 Nov 2011, 02:39 PM
Hello Raji,
an ASP .Net grid really is an HTML table element when you look at the HTML code.

Let's take the grid in this demo page:
http://demos.telerik.com/aspnet-ajax/grid/examples/client/selecting/defaultcs.aspx

Let's say I would like to go through all the Cells contained within this grid and write their content into my test log. We have an article that describes how that can be done:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/html/dynamic-grid.aspx

Here's the C# code that can do that:
foreach (HtmlTableRow r in Pages.ASPNETGridDemo.RadGrid1Table.AllRows)
{
    foreach(HtmlTableCell c in r.Cells)
    {
        Log.WriteLine("Cell found. TextContent:"+c.TextContent);
    }
}

If you take a close look you'll notice that the grid is actually a HTML table element in the code. The Grid designation is an abstraction - the actual element is an HTML table and in code we use it as an HTML table.

Please explain your use case to me. What are you trying to do and how is it a problem for you that the Grid is treated as a Table?

Kind regards,
Stoich
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Raji
Top achievements
Rank 1
Answers by
Raji
Top achievements
Rank 1
Stoich
Telerik team
Share this question
or