Forum Discussion

wmtan01's avatar
wmtan01
Contributor
4 years ago
Solved

How Aliases.browser.Terminate works

We're using Aliases.browser.Terminate to close the browser and noticed that with Chrome we were starting to see a broken cookie from our application. I know that is because of our application and not TestComplete but the problem now is I can't seem to replicate the issue manually. I've isolated and pinpointed the difference to be the .Terminate command in TestComplete.

 

Flow:

Launch our site in Chrome

Login with User1

Logout

[Close Browser]

Launch our side in Chrome

Login with User1

Logout

Login with User2

>FAIL

 

So when CloseBrowser is done by ALT+F4 or by Page.Close the test case passes but if CloseBrowser is done with Aliases.browser.Terminate the test case fails and the cookie shows up. I've tried replicating it manually using taskkill but it still worked. Question now is how does Aliases.browser.Terminate work in the back-end / Manual version of things?

  • hkim5's avatar
    hkim5
    4 years ago

    I think a manual way of terminating process is using the command taskkill

    but i may be wrong... since you already tried to replicate the behavior using that command. maybe some of the more seasoned users here can chime in.

3 Replies

  • from the TC Doc:

    ... use the Close() method instead I guess?😂

    from Microsoft Docs:

     

    • wmtan01's avatar
      wmtan01
      Contributor

      That works on the testing side but I don't think I can sleep at night knowing our app can reach that state 🤣

       

      I also noticed that the issue is not happening on our Staging environment so I really want to be able to replicate the issue manually.

       

      Is there a manual way of "imitating" Terminate? 

      • hkim5's avatar
        hkim5
        Staff

        I think a manual way of terminating process is using the command taskkill

        but i may be wrong... since you already tried to replicate the behavior using that command. maybe some of the more seasoned users here can chime in.