How can you handle keyboard and mouse actions using Selenium?
You can handle keyboard and mouse events with the advanced user interaction API. The advanced user interactions API contains actions and action classes.
Method Description
clickAndHold() Clicks without releasing the current mouse location
dragAndDrop() Performs click-and-hold at the location of the source element
keyDown(modifier_key) Performs a modifier key press (ctrl, shift, Fn, etc.)
keyUp(modifier_key) Performs a key release