Forum Discussion

norman_nelson's avatar
norman_nelson
New Contributor
11 years ago

Checkpoint for a #32770 window with an Icon

I'm trying to set a checkpoint for a #32770 spreadsheet window that has a icon to show status. I want the checkpoint to examine the Icon for one of three states. The window is the Station List. I have attached snippits of the three states.

Capture_connecting.PNG

Capture_ck.PNG

Capture_x.PNG

There is a ActiveX method "GetRowItemData" but I don't know how to include it in a keyword test. The description is "int GerRowItem(intRow); Returns the item data associated with the specified row."

 

Thanks,

Norm

 

3 Replies

  • Hi Norm,

    What is the WndClass of the "Station List" list box?

    • norman_nelson's avatar
      norman_nelson
      New Contributor

      Hi Helen,

       

      The WndClass = SPR32X35_SpreadSheet. From what I understand it comes from a 3rd party package.

       

      Norm

      • HKosova's avatar
        HKosova
        Icon for Alumni rankAlumni

        Hi Norm,

         

        This looks like the FarPoint Spread grid by ComponentOne. Here's the documentation on its properties and methods:

        http://helpcentral.componentone.com/NetHelp/Spread8/WebSiteHelp/titlea.html

         

        This grid has the TypePictPicture property and SavePicture method for saving a cell's image to a file:

         

        // JScript

        // Saves an image from a FarPoint Spread cell to a file.
        // Parameters:
        // grid - a FarPoint Spread grid object
        // row and column indexes of the image cell. Indexes start from 1.
        // fileName - The fully-qualified name of a PNG file to create function SaveCellImage2File(grid, row, column, fileName) { // The row and column indexed (1-based) of the image cell grid.Row = row; grid.Col = column; // Save the cell image to a file var pic = grid.TypePictPicture; if (! grid.SavePicture(pic, fileName, 4 /* Save as PNG */)) Log.Error("Failed to save the cell image."); }

        You can call this function from your keyword test using the Run Script Routine operation.

         

        You can then compare the saved image to an etalon image, for example, using the Compare Pictures operation.