Forum Discussion

czpqwerty's avatar
czpqwerty
Occasional Contributor
10 years ago

3rd party component indentification

there is one list view and cannot be indentified as .net list view. so it cannot use clickitem function to get one row.

i just use text recognition to identify. and i add this wndClass property.

 Capture.PNG

below is the list view property

Capture.PNG

after that, should this be recognized through text recognition?

 

but i still can not find rows in list view through

pnlPatientList.panel1.lvPatients.TextObject("xxx")

 

where am i wrong about this text recognition?

and i refer to http://support.smartbear.com/viewarticle/56486/ to  try this new technology

  • HKosova's avatar
    HKosova
    10 years ago

    Glacial ListView isn't compatible with Text Recognition and Object Mapping. You can automate it by using its native properties and methods - those in the .NET category in the Object Browser. For example (assuming the list view appears as a grid):

    Select an item (row):

    // JScript
    listObj.Items.Item(RowIndex).Selected = true;

    Get the number of items (rows) and columns:

    var rowCount    = listObj.Count;
    var columnCount = listObj.Columns.Count;

    Get a cell value:

    var value = listObj.Items.Item(RowIndex).SubItems(ColumnIndex).Text.OleValue;

    Sort by a column:

    listObj.Sort(ColumnIndex);
    listObj.NativeClrObject.Refresh();

     

    Hope this helps!

     

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)

    What's the ClrFullClassName property of this list view?

    • czpqwerty's avatar
      czpqwerty
      Occasional Contributor

      i replace the wndClassname. but still post an error.

      it says cannot find the text object.

       

      and another question, how to deal with the 3rd party list view.

      do you have some common solution to this?

      • TanyaYatskovska's avatar
        TanyaYatskovska
        SmartBear Alumni (Retired)

        Hi Clement ,

        I would recommend that you try resolving the issue in a bit different way. TestComplete provides powerfull support of .NET applications. Using Text Recognition is recommended only if nothing else helps.

         

        Thus, first of all, learn the value of the ClrFullClassName property of the problematic control (in the Object Browser). After that, go to the Object Mapping settings and explore the corresponding branch in the mapping tree – if the control you are using is inherited from the supported one, you can add the control’s class name to the tree.

         

        Please read the "Object Mapping" ( http://smartbear.com/viewarticle/55321/ ) help topic for more information.