Forum Discussion

MadGrb's avatar
MadGrb
Contributor
6 years ago
Solved

TestComplete cannot find nested Popup menu, In neste popup menu.

Hi,

I have massive Problem with nested popup menu.

 

In my case, are two popup menu but TC can find just first one and ignore second one.

 

Look at Photo 1.jpg and 2.jpg, 3.jpg that show us there is a Object from Class BarButtonItemLinkControl. But when I'm Looking for this object in my Code, I find she is not Exist.

 

Photo 4.jpg, 5.jpg.

 

How can solve this Problem.

18 Replies

  • PrathapR's avatar
    PrathapR
    Frequent Contributor

    maxrussell,

     

    If you would like to add "Contains" assertions(taking example), add that assertion to your response, after open that window ,give right click, will see "GetData" option, click on that, you will see all the Testcases etc.., please select your data source step, then select property which you would like to assert from "Properties" grid of "GetData" popup.

     

    For EX: If your Data source name, "DataSorce" and property name "Name", then assertion value will be looks like  ${DataSource#Name}

     

    And we have to add multiple assertions depends on fields( if you would like to go with all  fields of each row from your excel of your data source). 

    If you have have couple of them, better to go with inbuilt assertions(Contains, JSON path match etc..), but if your excel row contains many fields(Cells) for assertion, personally I would say groovy script is better option

    Let me know, if you need any help in that groovy script(If you have to go with that).

     

    Thanks!

    • maxrussell's avatar
      maxrussell
      Contributor

      This case is specifically many rows (cells) of data being read into the property in the data source step.

       

      The request response needs to assert each cell value (attribute) exists in the response.

       

      The assertion method suggested creates the assertion using index, which I'd prefer not to use.

       

      When I've tested building the assertion using Get Data from the property, it fails:

      $['Elements'][0]['column_name']

      ${Read_Excel_Sheet#attribute_name}

       

      I get an error that:

      Comparison failed. Path: ['$Elements'][0]['column_name']]; Expected value: []; Actual value: [actualvalue].

       

      the issue I have is that the property appears to be NULL although when tested in the excel datasource, it does return all the desired rows/cells.

       

      • PrathapR's avatar
        PrathapR
        Frequent Contributor

        maxrussell 

        Can you please check the box for use as regular expression and give like

        $['Elements'][*]['column_name'].

         

        If you have many rows, I would suggest to go by writing assertion in groovy script.