Forum Discussion

vadi's avatar
vadi
New Contributor
6 years ago

"Exists" suddenly stopped working with no change in code, where as "VisibleOnscreen" is working.

call aqObject.CompareProperty(picMailAddressTip.Exists,cmpEqual,"-1",True,lmError)

This was working till last week. Now im getting the error 

Wrong number of arguments or invalid property assignment: 'Sys.Process(...).WinFormsObject(...).Exists'

 

 

5 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I would say it is strange that it was working...

    .Exists returns boolean while you are comparing it to string.

    Try

    Call aqObject.CompareProperty(picMailAddressTip.Exists, cmpEqual, True, True, lmError)

    instead. Does it work?

     

     

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    vadi wrote:

    call aqObject.CompareProperty(picMailAddressTip.Exists,cmpEqual,"-1",True,lmError)

    This was working till last week. Now im getting the error 

    Wrong number of arguments or invalid property assignment: 'Sys.Process(...).WinFormsObject(...).Exists'

     

     


    My guess:

     

    "picMailAddressTip" is a variable to which you're assigning a WinFormsObject...  however, that WinFormsObject does not Exist at the time of execution (possibly a timing delay).

     

    I would replace your "WinFormsObject" to "WaitWinFormsObject" to properly account for the timing delay.

    • vadi's avatar
      vadi
      New Contributor

      Thanks guys for your prompt response. 

      Tried with "True" as well as WaitWinFormObjects. Then I analyzed what is the change happened in the environment before the sucessful run and this failure. 

      Found that Windows 10 pro Insider preview update, reverted the update and started working again. 

       

       

       

       

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        vadi:

        Hi,

         

        Thank you for the update.

         

        > Found that Windows 10 pro Insider preview update, reverted the update and started working again.

        While SmartBear guys monitor Community forums, I think that it may be not a bad idea to create Support Ticket via the https://support.smartbear.com/message/?prod=TestComplete form to explicitly draw their attention to the potential problem.

         

    • endorium's avatar
      endorium
      Frequent Contributor

      New version of chrome is out and I am getting a few oddities. Maybe linked?

      Above suggesitons seem good