What is Actions Class in Selenium

Action class in Selenium is a class that is used to perform user interactions, such as right click, double click, mouse hover, mouse clicks, keyboard events, and drag-and-drop actions, page scroll down-and-up on web elements. It is part of the org.openqa.selenium.interactions package in the Selenium API.

The different methods of Action class in Selenium are:

1. click() - It is used to perform a left-click operation on a web element.
2. doubleClick() - It is used to perform a double-click operation on a web element.
3. contextClick() - It is used to perform a right-click operation on a web element.
4. moveToElement() - It is used to move the mouse pointer to the center of a web element.
5. dragAndDrop() - It is used to drag a web element from its current location to a new location.
6. keyDown() - It is used to simulate pressing a keyboard key down while an element is being interacted with.
7. keyUp() - It is used to simulate releasing a keyboard key while an element is being interacted with.
8. build() - It is used to build a composite action, which is a series of actions that can be performed together.
9. perform() - It is used to execute the series of actions created using the build() method.