How to use Action class equivalent in selenium in Katalon studio

HI Team,

I want to use below code in Katalon studio:-

Actions actions = new Actions(driver);
actions.moveToElement(element);
actions.click();
actions.sendKeys(“Some Name”);
**actions.build().perform();
**
Can you guide me in Katalon studi how I can perform above code in manual mode?

Hi Murtaja,

Above code should be used in Scripting mode rather than Manual mode because it is currently a native code, not some built-in functions you can select from a list of available actions in Manual mode.

Hi Murtaja,

In my case I needed to move multiple Sliders, but taking your case in consideration you can create a method in you Custom keyword.PSB.

package yourpackage
//set of imports

//I needed to silde it horizontally
public class Slider {

@Keyword

def setSliderPosition(offset, index){
//some code to cal new_pos(offset X )

Actions slide = new Actions(_driver)

slide.dragAndDropBy(slider, new_pos, 0).build().perform() }
}


movetoElement shows underlines and this is not fixed, what class/interface or references i missed here as per screenshot?

@hiteshc: you missed the statement

import org.openqa.selenium.interactions.Actions

Try it out.

Thanks