# WATIR - ScriptError popup on IE - Unable to get rid of!

**URL:** <https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268>\
**Category:** ruby-talk\
**Created:** [31 July 2013 13:26 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268 "2013-07-31T13:26:53Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [31 July 2013 13:26 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/1 "2013-07-31T13:26:53Z")

</div>

I am new to Ruby & Watir, and I am having a nightmare with IE and Script  
Error popups on unspecified pages, and I need a way to supress these, or  
get rid of them. My Ruby/Watir script runs perfectly well, apart from  
these pesky "Script Error" popups.

I have tried all manner of different pop-up blocking bits of Watir, but  
no joy at all. I cant even change focus and clear it that way as  
"browser.close" doesnt do anything.

These popups are not proper IE windows, and are not JavaScript errors. I  
have changed all manner of Windows/IE settings, but these script errors  
will not go away.

Any help would be greatly appreciated.

Thanks!

Attachments:  
[http://www.ruby-forum.com/attachment/8642/Capture.JPG](http://www.ruby-forum.com/attachment/8642/Capture.JPG)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [31 July 2013 14:26 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/2 "2013-07-31T14:26:33Z")

</div>

It looks like there's an Adobe Flash element on the page which is  
causing a problem.  
If you follow the steps manually using IE with "No Add Ons", do you  
experience the same error?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [31 July 2013 16:35 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/3 "2013-07-31T16:35:36Z")

</div>

If you are using watir-webdriver with Firefox or Chrome you can disable  
Flash, that may help.  
(I don't believe this works with IE yet)

> <https://stackoverflow.com/questions/9636255/how-to-run-chrome-firefox-with-disabled-flash-plugin-from-watir-script>

Also, for Firefox there is a watir plugin to test flash, so that may be  
possible too.  
[https://code.google.com/p/flash-watir/](https://code.google.com/p/flash-watir/)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [31 July 2013 17:35 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/4 "2013-07-31T17:35:43Z")

</div>

Hey Graeme,

This looks like a message from IE script debugging, which you can turn  
off and it should disable all of the similar error messages.

You want Tools\>Internet Options\>Advanced\>Disable Script Debugging tick  
that one, and un tick Display a notification about every script error.

--Thai

> **···**
>
> ------  
> Author of Ruby For System Administrators  
> [http://ruby.elevatedintel.com](http://ruby.elevatedintel.com)
> 
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 08:23 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/5 "2013-08-01T08:23:58Z")

</div>

Thanks all, I wasn't anticipating a response that quickly!

Joel - With add-ons turned off, the issue doesn't happen. If I turn  
add-ons back on again, the issue comes back.

David - This doesn't happen with either Chrome or FireFox weirdly! We  
need flash to be left on due to the nature of the testing we will be  
completing with this script.

Thai - All script debugging is already turned off in IE, so im not sure  
why it insists on producing the error still! Attached is a screen shot  
of my IE script debugging settings.

Due to the nature of the testing we will be completing with this script,  
it wont be sites that we have control over, and we cant run the tests  
without JavaScript/Flash.

Is there any way to get Watir to recognise this error and deal with it,  
I tried most of the afternoon yesterday to sort it with various  
different solutions about on the Internet.

Attachments:  
[http://www.ruby-forum.com/attachment/8645/Capture1.JPG](http://www.ruby-forum.com/attachment/8645/Capture1.JPG)

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 10:01 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/6 "2013-08-01T10:01:57Z")

</div>

When you say you can't run the tests without JavaScript / Flash... I can  
see how JavaScript might be essential, but are you certain that Flash is  
essential? Perhaps you could specifically disable Flash in IE for these  
tests.

IE handles Flash differently from other browsers, and I find it to be  
the least stable browser as well. Have you considered using more capable  
browsers for your testing, such as Firefox? Watir-Webdriver will support  
most common browsers whereas Watir only supports IE.

I can't do much testing without being able to replicate this error. Can  
you provide a URL which consistently causes this error to appear?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 10:16 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/7 "2013-08-01T10:16:47Z")

</div>

The same script will be used in IE/FireFox & Chrome, not simultaneously,  
but IE will be used. Flash needs to be enabled for our testing.

Is there a way for Watir to deal with this error, or should I just kill  
the IE process to get rid of it?

Thanks

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 10:26 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/8 "2013-08-01T10:26:11Z")

</div>

Sorry, example URL:  
[https://www.demontfortstudents.com/404/?url=/involve](https://www.demontfortstudents.com/404/?url=/involve)

And click on one of the links on the page when the page has loaded to  
get the error.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 11:54 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/9 "2013-08-01T11:54:17Z")

</div>

I've used Watir with IE to navigate around the links on that site  
without incident. I can't find the error message. The Flash elements  
appear to work fine as well.  
I'm using a default install of IE 10.0.9200 with Add-Ons enabled.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [1 August 2013 11:56 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/10 "2013-08-01T11:56:59Z")

</div>

Im using IE9 with add-ons enabled, and flash 11.7.

Ill get IE10 installed, and ill try it again and see if that makes a  
difference.

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![7stud2](https://avatars.discourse-cdn.com/v4/letter/7/9de053/32.png) [@7stud2](https://rubytalk.org/u/7stud2)\
**Post date:** [2 August 2013 07:39 UTC](https://rubytalk.org/t/watir-scripterror-popup-on-ie-unable-to-get-rid-of/68268/11 "2013-08-02T07:39:32Z")

</div>

Hi Joel,

I now have IE10 installed, and it works fine for me also.

Looks like ill have to upgrade all my machines to IE10.....

Thanks

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
