Forum Discussion

anandmar24's avatar
anandmar24
Occasional Contributor
12 years ago

Please help me to select a Row of Teleric RadGridView which has a specific value in a column

Hi All,



I want to select a row which has say "XXX" in first column.



When I give Grid.wRowCount in VBScript, its throwing me error as


"The object with the specified attributes does not exist."



Please help me to select the cell.



FindRow is also not working.



Thanks in advance.


2 Replies

  • vajindarladdad's avatar
    vajindarladdad
    Frequent Contributor
    Hi Anand,

    It seems the DataGrid itself is not getting identified whilst the test is running.

    Please make sure that it is mapped correctly.



    To go further , you can use Selected property to select the particular row.

    Example:



    Grid.Rows.Item(index).Selected = True



    I hope this has been of some help.
  • anandmar24's avatar
    anandmar24
    Occasional Contributor
    Hi Vajindar,



    Actually the grid, rows, cells are all available in object explorer.



    Row is available as



    Sys.Process("YYY").WPFObject("HwndSource: SelectItemXaml", "Select Item").WPFObject("SelectItemXaml", "Select Item", 1).WPFObject("Border", "", 1).WPFObject("LayoutTemplate").WPFObject("RadGridView", "", 1).WPFObject("GridViewRow", "", 1)





    and Cell is available as



    Sys.Process("YYY").WPFObject("HwndSource: SelectItemXaml", "Select Item").WPFObject("SelectItemXaml", "Select Item", 1).WPFObject("Border", "", 1).WPFObject("LayoutTemplate").WPFObject("RadGridView", "", 1).WPFObject("GridViewRow", "", 1).WPFObject("GridViewCell", "XXX", 1)





    Also, I'm not getting rows using Grid.Rows also.



    Unable to find the object Rows. See Additional Information for details.



    The object with the specified attributes does not exist.



    These are the error messages i'm getting.



    I'm new to TestComplete. Please dont mind and help me.



    Thanks much.