java.lang.ClassCastException: While performing TouchActions

I’m getting the following issue. Please help me out.
I am trying to perform Singletap on the device settings-> display

java.lang.ClassCastException: class cannot be cast to class org.openqa.selenium.interactions.HasTouchScreen ( and org.openqa.selenium.interactions.HasTouchScreen are in unnamed module of loader ‘app’)
at org.openqa.selenium.interactions.touch.TouchActions.(

public void brightnessControl() {
WebElement display = driver.findElement(By.xpath("//android.widget.TextView[@text = ‘Display’]"));


public static void tapAction(WebElement ele) {
TouchActions action = new TouchActions(driver);


is Selenium and uses Webdriver.

Use Appium TouchAction instead ->

Or W3C Actions

Got it! Thanks!
here is my updated code:
public static void singleTapAction(WebElement ele) {