Forum Discussion

CHolman's avatar
Occasional Contributor
8 years ago

Cannot run keyword tests in sequence 'New instances will not be launched?'

I've got a bunch of keyword tests which; load IE, carry out a test, then close down IE..


When i run these individually they work fine, but when adding them to a folder inside test items the first one runs correctly, then the second fails and gives this error:


There is (are) 1 running instance(s) of "C:\Program Files\Internet Explorer\iexplore.exe". New instances will not be launched. 14:01:18 Highest


For some reason IE doesn't seem to be shutting down correctly, is there a way to force shut IE after my test has finished? I've used the 'BrowserWindow Close' command - but don't look like its working! :( 



2 Replies

  • tristaanogre's avatar
    Esteemed Contributor

    Best bet is, at the end of a test case, do a check to see if Process('iexplore') exists (use WaitProcess for this). If it does, call the Terminate method.  Then check again... do so until all the processes are killed.

  • CHolman's avatar
    Occasional Contributor

    So i've actually got around this problem by creating a separate keyword test which opens command prompt and issues this command: taskkill /F /IM iexplore.exe /T


    I run that after each of my tests and the next one loads correctly. Cheers for your help.