Right-clicking on an element

The Recorder does not support capturing or playing back right-click actions. The sample code below can fire the right-click action for an element. It has been tested for Internet Explorer (which is the most common browser to need a right-click action for), though it should work for others as well.

document.getElementById("asdf").fireEvent('oncontextmenu');