Hi,
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 io.appium.java_client.android.AndroidDriver cannot be cast to class org.openqa.selenium.interactions.HasTouchScreen (io.appium.java_client.android.AndroidDriver and org.openqa.selenium.interactions.HasTouchScreen are in unnamed module of loader ‘app’)
at org.openqa.selenium.interactions.touch.TouchActions.(TouchActions.java:38)
@Test
public void brightnessControl() {
WebElement display = driver.findElement(By.xpath("//android.widget.TextView[@text = ‘Display’]"));
MobileTapAction.tapAction(display);
}
public static void tapAction(WebElement ele) {
TouchActions action = new TouchActions(driver);
action.singleTap(ele).release().perform();
}