While running browser tests with Watir webdriver and FXDriver, everything seems to be functioning well except for one test that loads a lightbox containing a large amount of HTML. When this lightbox opens, Firefox displays a popup indicating that Utils.js line 432 from FXDriver has become an 'unresponsive script', causing the test to time out. Instead of simply extending the dom.max_script_run_time
, I would like to find a proper solution to fix the issue. Upon investigating the problematic line...
goog.string.canonicalizeNewlines = function(a) {
return a.replace(/(\r\n|\r|\n)/g, "\n")
};
It is evident why Firefox is becoming unresponsive due to this code snippet, but the real challenge lies in finding a way to prevent it from happening. This function is called from various places, making it difficult to debug since it's invoked by Watir in a Firefox instance without Firebug. What steps can be taken to resolve this issue?
Modifying the file, adjusting the timeout, or reducing the amount of HTML content are not viable solutions.