Forum Discussion

KLabrie's avatar
KLabrie
Occasional Contributor
9 years ago

Object invoked disconnect from client at website deployment

Hi,   I need to run smoke test at the deployment of our website. The test works, except at the deployment. I always get an error native.   Error: The object invoked has disconnected from its clie...
  • KLabrie's avatar
    8 years ago

    I fix my problem,

     

    I was getting a problem cause the time i was getting the document object and the time i was doing a query selector. The page was refreshing (due to the first load) and then my object got disconnected when trying to do the querySelector.

     

    Basicly i did :

     

    try
    {
       fromElement = getCurrentPage().contentDocument;
       elemFound = fromElement.querySelector(cssSelector);
    }
    catch (ex)
    {
        fromElement = null;
        elemFound = null;
    }

    So if the problem occur i just continue my loop and return null if I don't get what i want ater the timeout (for my case, it's doing what i want).