HOW TO USE ACTIONS (ADVANCED USER INTERACTIONS API) IN SELENIUM WEBDRIVER?

Actions: The Advanced User Interactions API is used to generate a sequence of actions. We can perform keyboard and mouse actions using Advanced User Interactions API.




Here is a code snippet to perform mouseover action using action class:

new Actions(driver)
       .moveToElement(someWebElement)
       .build()
       .perform();

Detailed explanation for the above program is as follows:



Following code is to perform mouseover action.
moveToElement(someElement)

build() and perform() must required to perform a action.





Post a Comment

0 Comments