I have to run a script from a plan file for every 10 minutes. I wrote a batch file and kept in windows scheduled tasks. for every 10 minutes, the batch file is launching new silk window(eventhough one already exists and in focus).
My requirement here is, if the silk is not opened already, the batch file has to open silk and select a test case from test plan by marked query. and run the test case. If the silk is already opened and test cases is already selected in plan file, it just needs to execute the marked test case from plan file.
Have your batch file invoke this vbscript:
</font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">yourTag = "test.vbs - Notepad"
Set WshShell = WScript.CreateObject("WScript.Shell"
testVar = WshShell.AppActivate (yourTag)
if (testVar<>-1) then
WScript.Echo "Not Found"
WshShell.Exec("C:\Program Files\Segue\SilkTest\Partner.exe -opt C:\fullPath\yourOpts.opt -r C:\fullpath2\yourScript.t"
end if</pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Your batch file should have this in it: