Not recognizing a data grid

5 posts, 0 answers
  1. Raji
    Raji avatar
    3 posts
    Member since:
    Nov 2011

    Posted 17 Nov 2011 Link to this post

    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
  2. Raji
    Raji avatar
    3 posts
    Member since:
    Nov 2011

    Posted 20 Nov 2011 Link to this post


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

    Thanks in advance
    Raji Vijay
  3. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 21 Nov 2011 Link to this post

    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
  4. Raji
    Raji avatar
    3 posts
    Member since:
    Nov 2011

    Posted 22 Nov 2011 Link to this post

    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

  5. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 25 Nov 2011 Link to this post

    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
Back to Top