← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #244043]: build a complete test infrastructure

 

Question #244043 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/244043

    Status: Open => Answered

Eugene S proposed the following answer:
I solved that problem by creating a kind of test set within a batch (*.bat) file that runs my scripts one by one. 
However in between the scripts I just refer to a piece of code (function) that does exactly what you want. For example close an IE page or any other open application.

That's my example implementation of determining whether there are any IE
windows open and if there are, close them:

:closeIE
echo Checking if Internet Explorer is running
tasklist /FI "IMAGENAME eq iexplore.exe" 2>NUL | find /I /N "iexplore.exe">NUL
if "%ERRORLEVEL%"=="0" echo iexplore.exe is running. Killing... & taskkill /F /IM iexplore.exe
) else (
echo iexplore.exe is NOT running

This is a simple "DOS function".
You can check and close applications in a similar manner.

If that's what you are looking for and you need more info about DOS functions, you can find it here:
http://www.dostips.com/DtTutoFunctions.php


Cheers,
Eugene S

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.