tags:

views:

286

answers:

1

How to use Right Mouse button in WatiN i tried the follwong code but didn't work..

Div div1 = pzDev.Div("AppExplorer"); Span sp1 = div1.Span(Find.ById(new Regex("cl_"))); NameValueCollection eventProperties = new NameValueCollection(); eventProperties.Add("button", "2"); sp1.FireEvent("onmouseover",eventProperties); Thread.Sleep(1000); sp1.FireEvent("onmousedown",eventProperties); sp1.FireEvent("onmouseup",eventProperties);

can any one plz suggest the right approach

A: 

This should work only if you have javascript event "onmouseover" or "onmousedown",etc. associated to your specified elements.

It will not made a right button, just simulate the call to a javascript event, like a right mouse click would have done.

Vaudry