Forum Discussion

Adagio's avatar
Adagio
Frequent Contributor
8 years ago

Error after closing tabs in the Chrome browser

Hello,

 

I'm running some tests in the chrome browser. These tests open a new tab, verifies something and then closes it.

Everything is working fine, but when I look at the logs, it says 'the page was not closed'.In reality, it was closed.

I'm not able to figure out the reason yet. Could someone tell me what's happening here? 

 

Thank you

Abhi

 

1 Reply

  • Marsha_R's avatar
    Marsha_R
    Icon for Champion Level 3 rankChampion Level 3

    Sounds like a timing issue.  The check for "tab closed" may be happening faster than the actual close.  There are various ways to handle this:

     

    • Use one of the various Wait functions in a loop to check on the tab and if it's still there, wait and check again
    • Put a hard delay right before checking for the closed tab

    • Change your project settings to wait just a little longer between the execution of each line of the test
    • ??? other people's favorite ideas