Fix failing test in IE.

element.click() only works when element is in the document.