How to swipe/scroll on Android chrome browser?


#1

How to swipe/scroll on Android chrome browser? Up, down?
For scroll up I have tried so may way but it’s not wroking two of them are:

ExecuteMethod method = new RemoteExecuteMethod(driver);
RemoteTouchScreen screen = new RemoteTouchScreen(method);
screen.up(10, 20);

and

driver.context("NATIVE_APP");
new TouchAction(driver).press(500, 1450).waitAction(Duration.ofMillis(1000)).press(500, 400).release().perform();

chrome = 66.0.3359.158)
chromedriver = 2.37.544315
java-client: 5.0.4
appium server: 1.8.0