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.
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?
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.
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.
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?