OrgopenqaseleniuminteractionsActions class Deprecated | Selenium Forum
S
Shilpa Posted on 04/04/2019

I have recently moved to Selenium 3.14 and

org.openqa.selenium.interactions.Actions

is deprecated in the same. What can I use instead of it? JavaDocs only say that use new Interactions API but I can't find any new documentation around it.


A
Ashish Thakur Replied on 09/04/2019

Parts of Actions class is deprecated as it  has been moved to new Interactions class.

But the method that we need to use is not deprecated.

Use of the method below makes it to be used with webdriver.

Actions act = new Actions(driver);


S
Shilpa Replied on 16/04/2019

But when I give

import org.openqa.selenium.interactions.Actions;
it complains that it can't find Actions class.


S
Shilpa Replied on 16/04/2019

And this is the code where I am using Actions class:

 

Actions action = new Actions(getDriver());
action.moveToElement(findElementByXpath(DELETE_CONFIRMATION_TEXT).element()).sendKeys(Keys.chord(Keys.TAB, Keys.TAB, Keys.ENTER));
action.build().perform();


A
Ashish Thakur Replied on 22/04/2019

I am not sure but I am able to do it

May be you have not included all jars

its not depricated