Header Ads

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.





No comments


What would you like to add in my list? I look forward to reading your comments below.



Powered by Blogger.