Absent Member.
Absent Member.
1816 views

Getting around browser dialogs when you don't know when they will show up.

Jump to solution

Hello all,

I am trying to get past the browsers dialog popup box when a script is taking a long time to run. I have been trying to use the BrowserDlgSetButton, but am not seeming to have any luck in using it.  Basically I just set up the BrowserDlgSetButton, BrowserNativeClick on the button to kick off the script and then I wait am waiting for the script dialog box to show up.  Has anyone done anything like this before or have any ideas for me.

 

Thanks,

0 Likes
2 Solutions

Accepted Solutions
Absent Member.
Absent Member.

Hi btodd22 again,

Now I tried to reproduce the problem with IE8.

Regarding the "stop script" message also read this MSDN knowledgebase entry:

http://support.microsoft.com/kb/175500/en-us

In this article there is also mentioned a registry key which decides the number of JavaScript statements after which the "stop script" message is displayed. Seems to work for IE8. I reduced this value to provoke the message to appear.

Using a simple self built example I recorded the page including the "stop script" message.

The resulting script contains these API calls.

BrowserDlgSetButton("Windows Internet Explorer #1", "Yes");
BrowserClick("//INPUT[@id='runJs']", BUTTON_Left); // causes "stop script" message
BrowserDlgStop();

So you have to surround the action which causes the "stop script" message to appear with the BrowserDlgSetButton() and BrowserDlgStop() calls.
Note: The BrowserDlgSetButton() have to be inserted before the BrowserClick()!

This solved the issue on a Windows XP machine with IE8.

Philip

View solution in original post

0 Likes
Absent Member.
Absent Member.

This is what I was looking for thanks.

View solution in original post

0 Likes
3 Replies
Absent Member.
Absent Member.

Hi btodd22!

I would recommend to upgrade to IE9.

I created a web page with a script which is running 1:12 minutes when a button is pressed and both the Browser Application and the runtime for the loadtest replay this one without showing any error messages or "stop script" messages.

Regards,

Philip

My machine: Windows 7 64bit, IE9

Tags (2)
0 Likes
Absent Member.
Absent Member.

Hi btodd22 again,

Now I tried to reproduce the problem with IE8.

Regarding the "stop script" message also read this MSDN knowledgebase entry:

http://support.microsoft.com/kb/175500/en-us

In this article there is also mentioned a registry key which decides the number of JavaScript statements after which the "stop script" message is displayed. Seems to work for IE8. I reduced this value to provoke the message to appear.

Using a simple self built example I recorded the page including the "stop script" message.

The resulting script contains these API calls.

BrowserDlgSetButton("Windows Internet Explorer #1", "Yes");
BrowserClick("//INPUT[@id='runJs']", BUTTON_Left); // causes "stop script" message
BrowserDlgStop();

So you have to surround the action which causes the "stop script" message to appear with the BrowserDlgSetButton() and BrowserDlgStop() calls.
Note: The BrowserDlgSetButton() have to be inserted before the BrowserClick()!

This solved the issue on a Windows XP machine with IE8.

Philip

View solution in original post

0 Likes
Absent Member.
Absent Member.

This is what I was looking for thanks.

View solution in original post

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.