Avoid shouldInterruptJavaScript in PySide QT4 - Python
Question: I am using PySide '1.2.2' and trying to avoid the msgbox alerting a potential
javascript error, since it is due to the site being sizeable. I am using this
code from this other answer:

[Override shouldInterruptJavaScript in QWebPage with
PySide](http://stackoverflow.com/questions/6868286/override-
shouldinterruptjavascript-in-qwebpage-with-pyside)

    
    
    import sys
    from PySide import QtCore
    from PySide.QtGui import QApplication
    from PySide.QtWebKit import QWebPage
    
    class QWebPageHeadless(QWebPage):
        # FIXME: This is not working, the slot is not overriden!
        @QtCore.Slot()
        def shouldInterruptJavaScript(self):
            print( 'not interrupting')
            return False
    

I have tried implementing the class above, and all sorts of derivatives of it,
but with no success, it never gets to execute. Any thoughts on how to do this?
Thank you


Answer: I found the "solution". Forget about PySide and PyQt, you will just end up
with headaches, use Selenium. Very easy to implement and powerful for this
purpose. Works great!

