Forum Discussion
Support not able to resolve the issue.
I put the handler as firefox is getting hung so it kill the fireofx and we do not get this issue. but we got another issue - The Operation cannot be performed because the user session is locked.
REM Kill Firefox if it Exists
tasklist /FI "IMAGENAME eq firefox.exe" 2>NUL | find /I /N "firefox.exe">NUL
if "%ERRORLEVEL%"=="0" taskkill /f /t /im firefox.exe
timeout /T 2
Why we are getting the error - user sessin is locked ?
Thanks
NG
Does your ten tests run sequentially in the same firefox or each test close firefox and launch another one ?
Generally i restart a new instance of Firefox every 5 tests to avoid problems due to :
- memory leak in tested app
- memory footage of firefox
- crash of firefox
We are running our projects(tests) using batch file.
when running each project - we check whether any browser is running and if it is then close and kill the browser . launch the browser and ran some steps of the tests. Once the step is finished , we close the browser and also kill the browser process.
Now when the next project in sequence - we are checking again if there is any browser process then close and kill . Then doing the same steps as mentioned above. and so on.
let me know if you need more information. I have attached the batch file this trigger the project.
Thanks
NG
Hi,
a) I would add 'start /wait' before any line that starts test execution via TestExecute to postpone batch file execution until TestExecute exits;
b) While this is not a solution but rather workaround, take a look at the Freeze Diagnostic option (https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/properties/freeze-diagnostics.html)