selenium actionchains code example
Example 1: what is action in selenium
- Actions class allows us to do advanced mouse-keyboard actions.
- such as:
-hovering over
-double click
-right click (contextClick)
-drag and drop
-click and hold
-release
syntax: Action action = new Action(Driver.getDriver());
action.methodName.perform();
Example 2: selenium api
ActionChains(driver).key_down(Keys.CONTROL).send_keys('c').key_up(Keys.CONTROL).perform()