Forum Discussion
chicks
11 years agoRegular Contributor
I have started to see this issue as well using IE9. See function CloseIE below.
I ichanged the code from Sys.Process... Close() to Sys.Process...Terminate() to avoid having to deal with the are you sure you want to leave popup.
However, I now get access denied referencing the .Terminate() line.
NOTE: When I tried to use this routine
function trial43014a() {
Sys.Process(browserToUse).Terminate();
Sys.Process(browserToUse).Terminate();
}
I never got "access is denied" . I just got the process was not found.
function CloseIE()
{
//Try timeOutWait times to close IE
var count = 0;
while(Sys.WaitProcess(browserToUse, 0).Exists)
// while (Sys.WaitProcess(browserToUse, 1500, 1).Exists)
{
//Sys.Refresh();// Sys.Process("iexplore').Close() 7.13.2012
// 4/29/14 previously was .Close() stopping due to "are you sure you want to leave" popup use .Terminate()
Sys.Process(browserToUse).Terminate();
Sys.Refresh();
//while(Sys.WaitProcess(browserToUse, 1000).Exists){}
// I've seen an infinite loop when this is called and a modal popup "are you sure you want to leave"
// when in GMAIL occurs... Curt H. 6.22.2012
if (count > 9) {
Log.Error("Attempted to close browser more than 9 times ");
Sys.Process(browserToUse).Terminate();
throw new Error("excessive Browser closures" );
}
count++;
}
}
I ichanged the code from Sys.Process... Close() to Sys.Process...Terminate() to avoid having to deal with the are you sure you want to leave popup.
However, I now get access denied referencing the .Terminate() line.
NOTE: When I tried to use this routine
function trial43014a() {
Sys.Process(browserToUse).Terminate();
Sys.Process(browserToUse).Terminate();
}
I never got "access is denied" . I just got the process was not found.
function CloseIE()
{
//Try timeOutWait times to close IE
var count = 0;
while(Sys.WaitProcess(browserToUse, 0).Exists)
// while (Sys.WaitProcess(browserToUse, 1500, 1).Exists)
{
//Sys.Refresh();// Sys.Process("iexplore').Close() 7.13.2012
// 4/29/14 previously was .Close() stopping due to "are you sure you want to leave" popup use .Terminate()
Sys.Process(browserToUse).Terminate();
Sys.Refresh();
//while(Sys.WaitProcess(browserToUse, 1000).Exists){}
// I've seen an infinite loop when this is called and a modal popup "are you sure you want to leave"
// when in GMAIL occurs... Curt H. 6.22.2012
if (count > 9) {
Log.Error("Attempted to close browser more than 9 times ");
Sys.Process(browserToUse).Terminate();
throw new Error("excessive Browser closures" );
}
count++;
}
}
Related Content
Recent Discussions
- 5 days ago
- 5 days ago