Search code examples
c#javascriptjqueryinternet-explorer-9watin

WatiN doubleclick not working in IE9


I'm using watin testing tool for our asp.net mvc 3 web application.

The same test works for ie 8 but not for ie9.

Element element = frame.ElementWithTag("td", Find.ByText("a14"));
element.DoubleClick();

Any Idea? or workaround to simulate doubleclick in ie 9.


Solution

  • As a workaround, if you have jquery available on your page you could do as I did:

    row.DomContainer.Eval(string.Format("$('#{0}').dblclick();", row.Id));
    

    I had tried several different variations on the ondblclick event, which WatiN uses itself (line 470 of Core.Element), to no avail.