Answers for "class io.appium.java_client.AppiumDriver cannot be cast to class org.openqa.selenium.interactions.HasTouchScreen (io.appium.java_client.AppiumDriver and org.openqa.selenium.interactions.HasTouchScreen are in unnamed module of loader 'app')"

1

class io.appium.java_client.AppiumDriver cannot be cast to class org.openqa.selenium.interactions.HasTouchScreen (io.appium.java_client.AppiumDriver and org.openqa.selenium.interactions.HasTouchScreen are in unnamed module of loader 'app')

public void scrollDown()  {

    //The viewing size of the device
    Dimension size = driver.manage().window().getSize();

    //x position set to mid-screen horizontally
    int width = size.width / 2;

    //Starting y location set to 80% of the height (near bottom)
    int startPoint = (int) (size.getHeight() * 0.80);

    //Ending y location set to 20% of the height (near top)
    int endPoint = (int) (size.getHeight() * 0.20);

    new TouchAction(driver).press(PointOption.point(width, startPoint)).waitAction(WaitOptions.waitOptions(Duration.ofMillis(2000))).moveTo(PointOption.point(width, endPoint)).release().perform();

}
Posted by: Guest on March-10-2021

Code answers related to "class io.appium.java_client.AppiumDriver cannot be cast to class org.openqa.selenium.interactions.HasTouchScreen (io.appium.java_client.AppiumDriver and org.openqa.selenium.interactions.HasTouchScreen are in unnamed module of loader 'app')"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language