1

I use the following code to simulate right button click

NameValueCollection eventProperties = new NameValueCollection(); eventProperties.Add("button", "2"); box.FireEvent("onmousedown", eventProperties);

they work well in IE, but does not work in Firefox, Firefox still recognize the click as left (0) button button.

Thanks

Sendoh
  • 25
  • 2
  • 7

2 Answers2

0

I've come up against this as well. It will probably be seen to within WatiN but I did find a workaround.

The workaround is not great as it involves a local variable to give the tests a hook. Test sets variable, and then right click checking code either works to

button == 2 || testHook == 1

Not pretty but it seems like a tricky one until the framework is updated.

dove
  • 20,469
  • 14
  • 82
  • 108
0

See my answer to solve this for FireFox here. This needs to be fixed in WatiN though.

Jeroen

Community
  • 1
  • 1
Jeroen van Menen
  • 2,418
  • 1
  • 15
  • 11