Forum Discussion

Tazbir's avatar
Tazbir
New Contributor
3 years ago
Solved

tested window (or control) has been deleted

Hi,

I'm new to test complete. I have built my first script using cucumber BDD. I'm testing Salesforce Application. Whenever I run my feature file I get "tested window (or control) has been deleted" error message and my test stops at execution. This only happens when I lunch my chrome browser from the extended monitor. I don't get the message when I run the script by launching the chrome browser from the laptop. Anyone knows what is the root cause of this issue and how to resolve it? I have tried putting Aliases.browser.RefreshMappingInfo(); into my hooks file @BeforeFeature function but still having the issue.

  • If the object has been recreated, then to avoid the error, get the new object before the method call.

     

    Try doing a Get on the page before looking for the elements.

4 Replies

    • Tazbir's avatar
      Tazbir
      New Contributor

      The detail tab has this message:

       

      The window with the handle 0x00000000 does not exist.

      This error occurred when the tested window (or control) or its parent object was deleted or recreated right before the method call. For example, you stored a window reference to a variable and then called a method through this variable.
      If the object has been recreated, then to avoid the error, get the new object before the method call.

      Tested object:
      Aliases.browser.pageLogin.textbox
      (Sys.Browser("chrome").Page("url_name").FindElement("//input[@id=(//label[.='Username']/@for)]"))
       
      I'm not sure how to resolve the issue.
      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        If the object has been recreated, then to avoid the error, get the new object before the method call.

         

        Try doing a Get on the page before looking for the elements.