
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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,
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
This is what I was looking for thanks.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
This is what I was looking for thanks.