Forum Discussion

farhanahmed's avatar
farhanahmed
Contributor
13 years ago

PopupMenu item click not working...

i have a little problem i need to click popup menu item.im doing it as following way.

i have all my object button names in the excel file when i click on button popupmenu appears i need to click on popupmenu item but its not working when i pick button object from the excel file but it works when i do it without picking it up from the excel file i have another check if object exists then click on the object code is as follows

Function mo_DefineUndefineParam (defUndef)

ExcelDriverPath1="D:\Perforce\ISCP_Main\Projects\ISCP_Test\Test\CardDesigner_New\ELEMENT_VariousViewerAndEditors\Stores\DB_DefineUndefine_Parameters.xls"

Call DDT.ExcelDriver(ExcelDriverPath1,"Sheet1")

    

  While Not DDT.CurrentDriver.EOF    

    parameterName=DDT.CurrentDriver.Value("Param_name")

    Log.Message parameterName&"-->" & Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,500).Exists                                                    

      If defUndef="Define" Then

        If Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).Exists then

          Call Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).Click                

          Call Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).PopupMenu.Click("Define optional      attribute")                       

         End if

          aqutils.Delay(500)            

      Elseif defUndef="Undefine" Then

        If Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).Exists then

         Call Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).Click        

         Call Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).PopupMenu.Click("Undefine optional attribute")

        End If

          aqutils.Delay(500)             

      End If

                       

  Call  DDT.CurrentDriver.Next()

  WEnd

  DDT.CloseDriver(DDT.CurrentDriver.Name)

 

End Function



Error appears on the following line

Call Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).Click                

Call
Aliases.CardDesigner.editors.CardParameter.WaitAliasChild(parameterName,1000).PopupMenu.Click("Define
optional     



Two error appear

Overlaping window

Can not obtain popupmenu item



any help how what could be the problem??

Thanks in advance
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)
    Hello,

    The "Overlapping Window" error occurs when another window covers the area you need to interact with. That is, a window may cover the button preventing TestComplete from clicking it so that the pop-up menu does not appear on the screen.

    Please check the test log - it contains information on the overlapping window. To learn how to handle the overlapping window error, please see the Handling Unexpected Windows Help topic.

    Please let us know your results.

    Thank you.