Ever seen an error like this?
NS_ERROR_FAILURE: Component returned failure code: 0×80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLSelectElement.selectedIndex]([Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLSelectElement.selectedIndex]” nsresult: “0×80004005 (NS_ERROR_FAILURE)” location: “JS frame :: http://myhost:myport/test/runner?unit=validationTest :: anonymous :: line 325″ data: no])
The problem is that I was doing an element.selectedIndex=index, where index is TOO HIGH!!!!
So, in my case I have a select element with an id of select_id and this is what my test was doing…
var x = $('select_id'); x.selectedIndex = 3;
But there are only 3 elements, and we are zero base indexing therefore it is out of range. But it creates that nasty wasty NS_ERROR_FAILURE, instead of something that tells you that the index is simply out of range.