Forum Discussion

vinayak_bhat's avatar
11 years ago

Getting Error "The object invoked has disconnected from its clients"

While executing the script getting Error "The object invoked has disconnected from its clients".



Kindly let me know the reason and how to solve the issue
  • Hi Vinayak,

     


    What TestComplete version are you using? Try the latest one - TestComplete 10.30.


    Is the problem reproduced in TestComplete 10.30? If it is, please contact our Support team as some additional investigation may be required.

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Jyothi,

     


    This behavior is very strange. I can suggest the following workaround to you: save the property values of the button to variables and, after this, click the button:




    Dim objType, contText


     


    if(oButton.Exists or oButton.Enabled)then


          objType = oButton.ObjectType


          contText = oButton.contentText


          oButton.Click


          szResult = "PASS"


          szResultDescript = objType &" "& contText & " is clicked."


    End if  




     


    How does this work for you?

  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Vinayak,

     


    What TestComplete version are you using? Try the latest one - TestComplete 10.30.


    Is the problem reproduced in TestComplete 10.30? If it is, please contact our Support team as some additional investigation may be required.

  • jyothi_pp_1's avatar
    jyothi_pp_1
    Occasional Contributor
    Adding to the above issue(I am also working for the same project with Vinayak Bhat), we are using TestComplete 10.0.531 . Currently there is no plan of upgrading TestComplete. This object disconnected issue we are getting when we run the script in browser say Chrome, Safari. In IE it was working fine.

    Scenario is:

    When we try to click on a button:

    Will be creating button object using FindChild method. Then in the code when we call click button function,

    if(oButton.Exists or oButton.Enabled)then

          oButton.Click

          szResult = "PASS"

          szResultDescript = oButton.ObjectType &" "&oButton.contentText& " is clicked."

    End if  

    It says object exists and goes inside the loop. But as soon it performs the click operation the object is lost in Chrome and Safari browser. And when we try to get the  oButton.ObjectType  in the result ,it throws object disconnected error.

    Can you please confirm this specific issue will be solved in higher version. If so we can ask for TestComplete upgradation from our customer.



    Thank you.

    Jyothi
  • jyothi_pp_1's avatar
    jyothi_pp_1
    Occasional Contributor
    OK.. Will implement this workaround and update you.



    I have posted some other Safari browser issue as a new thread, can you please guide us to solve the issue?

    Thank you.