Forum Discussion
jorgesimoes1983
11 years agoRegular Contributor
I use this piece of code, inside a bat (placed at the root of the TestComplete project)
[kill_IE.bat]
taskkill /f /im "iexplore.exe"
start /MAX iexplore.exe
then call it every time I need to start IE like this:
function kill_internet_explorer()
{
// Obtains the path to the current project
var Path;
var ficheiro = "kill_IE.bat";
Path = Project.Path;
Path += ficheiro;
var objShell = new ActiveXObject("shell.application");
objShell.ShellExecute(ficheiro, "", "Path", "open", 1);
Delay(2000);
}
[kill_IE.bat]
taskkill /f /im "iexplore.exe"
start /MAX iexplore.exe
then call it every time I need to start IE like this:
function kill_internet_explorer()
{
// Obtains the path to the current project
var Path;
var ficheiro = "kill_IE.bat";
Path = Project.Path;
Path += ficheiro;
var objShell = new ActiveXObject("shell.application");
objShell.ShellExecute(ficheiro, "", "Path", "open", 1);
Delay(2000);
}