What is the interaction to capture right click on a browser?

automation-studio

#1

What is the interaction to capture right click on a browser?


#2

Hi Kavitha,
You can use "Open Context menu " interaction which is present in IE-Selenium, chrome and firefox browsers for rt click


#3

with JavaScript block you can add a eventlistner for attribute “contextmenu”. Basically this attribute(i.e. oncontextmenu) in any HTML tag guides the browser for action on right click.
Just add this attribute or attach and event listener to this attribute as needed. Google it,you’ll find plenty of solutions.

Question is do you want to capture right mouse click during entire automation?? if that is the case, you’ll have to attach the “contextmenu” listener on body tag itself.Just by returning false for oncontextmenu, you can restrict the right click on any webpage.