Forum Discussion

bdrummond's avatar
bdrummond
Contributor
7 years ago
Solved

TC thinks of popup menu on a text box.

Not long after I sorted an Object.Saves() method issue, I came across a strange issue where when a test is running in anything near my "titleTextBox" object TC comeback with an error of "Cannot obtain the popup menu".

 

I also have tried to contact TC support which they come back saying:

 

"It looks like the PopupMenu property is also checked in the Objects collection as a property you need to save. In this case, what happens is the following: TestComplete inspects the checked properties in order to save their values, but the PopupMenu property is null (which is expected when the popup menu is opened) and its value cannot be saved to Objects. So, the error you refers to the object's property, it doesn't mean the object itself is a popup menu. To see whether this is the case, I suggest that you check the list of checked properties and remove PopupMenu from there if it's checked. Does this help?"

 

Well, one, I couldn't really find and remove this 'checked' PopupMenu property from? I have screenshots where, i'd thought I could unchecked it but to no avail. I have made sure PopupMenu isn't selected when trying to add a new Object in TC's Stores. see image.

 

stuck - its working ok when 'Stop on error' option is switched off and results are as expected too - it's just a bit messy with red error crosses in test log.

 

any advise appreciated.

 

BD

  • Just had a GoToMeeting with TestComplete support staff - it seems that this is something to do with the App i was testing.

     

    Although - As i understand it, they will look at this and escalate it to their developer and will get back to me as soon as it's been looked at.

     

    In the meanwhile, a workaround is to create error handler built into the project.

     

    function GeneralEvents_OnLogError(Sender, LogParams)
    {
      //if TC throw the usual "Cannot obtain the popup menu on the title text box object
      if (LogParams.MessageText == "Cannot obtain the popup menu.")
      {
        //ignore the error and dont log it in Test Log.
        LogParams.Locked = true;
      }
    }

    Will be using this for a while, i think, as the error is not a show stopper.

     

    BD

4 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    Did you report your results to Support?  That would be the first thing to do.

    • bdrummond's avatar
      bdrummond
      Contributor

      hey Marsha_R

       

      yes i have done so indeed on friday afternoon - just had a reply aerlier today.

       

      looks like there is something going on with Test Complete as there is no PopupMenu property selected on a particular Object i am working with - yet TC still trying to invoke the Popoup Menu.

       

      They have offer to have a meeting to see whats is going on.

       

      i will update the situation in this article once i have got an answer.

       

      thanks 

       

      B

      • bdrummond's avatar
        bdrummond
        Contributor

        Just had a GoToMeeting with TestComplete support staff - it seems that this is something to do with the App i was testing.

         

        Although - As i understand it, they will look at this and escalate it to their developer and will get back to me as soon as it's been looked at.

         

        In the meanwhile, a workaround is to create error handler built into the project.

         

        function GeneralEvents_OnLogError(Sender, LogParams)
        {
          //if TC throw the usual "Cannot obtain the popup menu on the title text box object
          if (LogParams.MessageText == "Cannot obtain the popup menu.")
          {
            //ignore the error and dont log it in Test Log.
            LogParams.Locked = true;
          }
        }

        Will be using this for a while, i think, as the error is not a show stopper.

         

        BD