Forum Discussion

smartbutton's avatar
smartbutton
Occasional Contributor
9 years ago

Getting browser already open error message in Test Execute

Hi,

 

I am trying to run a project in Test Execute, first script is running successfully and closing the browser at the end of the script.

For running the second script Test execute is stopping and giving error messages in the logs "The browser is already running'.

But these scripts are running fine on Test complete.

Please see the attached screen shot for errors, I am new to Test complete and test execute. Please advice.

 

Thanks,

Anna

9 Replies

  • DCat1223's avatar
    DCat1223
    Frequent Contributor

    Hi Anna...

     

    I was having the same issue.  I resolved this by putting a 15000 MS (15 second) delay in at the end of the script to give the browser time to fully close.  I'm using the Keyword test, not scripted.  This is in the Miscellaneous tab of the Operations pannel.

     

    Hope this helps you out.

     

    Dave.

    • djadhav's avatar
      djadhav
      Regular Contributor

      I add all the browsers I use for testing to the TestedApps section. The at the end of every test I run this routine to close the browsers as required.

       

      'closes the tested browser
      FUNCTION lib_closeBrowser(browserType)
        DIM testedAppIndex
        testedAppIndex = TestedApps.Find(browserType)
        'find index of the tested browser
        IF NOT (testedAppIndex < 0) THEN
          Log.Message("Closing browser : " & browserType)
          IF Sys.WaitBrowser(browserType,3000).Exists THEN
            TestedApps.Items(testedAppIndex).Close
          END IF
          IF Sys.WaitBrowser(browserType,2000).Exists THEN
            TestedApps.Items(testedAppIndex).Terminate
          END IF
          IF Sys.WaitBrowser(browserType,1000).Exists THEN
            CALL kill_Browser(browserType)
          END IF
        ELSE
          Log.Error("Closing browser : " & browserType & " : ERROR: Application not found")
        END IF
      END FUNCTION
      
      'CALL function like this
      lib_closeBrowser("iexplore")
      lib_closeBrowser("chrome")
      lib_closeBrowser("firefox")