How to scroll up and down in app

This is my app page I am filling every field. But how to swipe the up in the script command in small swiping

Test record in your Appium Studio with u r App by scrolling up and down. Appium Studio will generate the code.

For example it will generate code like this …

 new TouchAction(driver).press(492, 514).waitAction(Duration.ofMillis(3800)).moveTo(578, -1035).release().perform();
        new TouchAction(driver).press(807, 1010).waitAction(Duration.ofMillis(957)).moveTo(682, 121).release().perform();
        new TouchAction(driver).press(678, 1621).waitAction(Duration.ofMillis(1030)).moveTo(678, 1921).release().perform();
        new TouchAction(driver).press(660, 1007).waitAction(Duration.ofMillis(957)).moveTo(660, 107).release().perform();
        new TouchAction(driver).press(660, 1007).waitAction(Duration.ofMillis(856)).moveTo(660, 707).release().perform();
        new TouchAction(driver).press(660, 1607).waitAction(Duration.ofMillis(773)).moveTo(660, 2057).release().perform();
        new TouchAction(driver).press(660, 1607).waitAction(Duration.ofMillis(670)).moveTo(660, 1907).release().perform();
        driver.context("WEBVIEW_1");
        driver.findElement(By.linkText("Hindi")).click();

Basically you have to use TouchAction class of Appium and run the code against Appium Studio.

how to scroll in a app screen element to element.
in my page 20 fields there. in that scenario how to scroll one element to another element

Sorry, the test recording feature to go to specific field should work ? Have you tried?
Check in the code which I had pasted the code was generated and found element with a specific link text. Similarly u can record element by element.

Generally if you are not using test recording the you will have to use Appium libraries Touch Action and develop the test and run it against Appium Studio.

i tried you given commands, i am getting bellow error message

[RemoteTestNG] detected TestNG version 6.8.2
[TestNG] Running:
C:\Users\User\AppData\Local\Temp\testng-eclipse-482537514\testng-customsuite.xml

FAILED: SellerRegistrationandLogin
org.openqa.selenium.WebDriverException: unknown error (Exception of type ‘java.lang.NullPointerException’ : Unknown Exception message (null)) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 50 milliseconds
Build info: version: ‘2.45.0’, revision: ‘5017cb8’, time: ‘2015-02-26 23:59:50’
System info: host: ‘DESKTOP-GHH97TE’, ip: ‘192.168.29.240’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_201’
Driver info: io.appium.java_client.android.AndroidDriver
Capabilities [{appPackage=com.mobile.producersonline, device.majorVersion=9, dontGoHomeOnQuit=false, device.os=Android, noReset=false, dontStopAppOnReset=false, reservationDuration=240, reportFormat=xml, deviceName=XUV3Y18725041617, fullReset=false, platform=ANY, deviceUDID=NE1GAM4782036608, install.only.for.update=false, desired={app=D:\App\app-release_2_29_103_demo.apk, appPackage=com.mobile.producersonline, appActivity=com.mobile.producersonline.SplashActivity, platformName=Android, platformversion=8.0.0, deviceName=XUV3Y18725041617}, device.serialNumber=NE1GAM4782036608, locationServicesAuthorized=false, device.version=9, reportDirectory=reports, autoWebview=false, platformName=Android, udid=NE1GAM4782036608, testName=mobile test 11/02/19 12:59 PM, device.screenSize=720x1280, useKeystore=false, app=D:\App\app-release_2_29_103_demo.apk, test.type=Mobile, device.manufacture=HMD Global, instrumentApp=false, appiumVersion=1.8.0, device.category=PHONE, autoDismissAlerts=false, reportUrl=C:\Users\User\appiumstudio-reports\reports\test8250, newSessionWaitTimeout=300, keystorePath=~/.android/debug.keystore, appActivity=com.mobile.producersonline.SplashActivity, waitForDeviceTimeout=120000, device.model=TA-1032, device.name=TA-1032, autoGrantPermissions=false, takeScreenshots=true, platformversion=8.0.0, projectName=, autoAcceptAlerts=false}]
Session ID: 89de5c6c-a232-47e9-ab96-b47d467364d9
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:180)
at io.appium.java_client.AppiumDriver.performTouchAction(AppiumDriver.java:293)
at io.appium.java_client.TouchAction.perform(TouchAction.java:301)
at src.Production.SellerRegistrationAddProductsCases.SellerRegistrationandLogin(SellerRegistrationAddProductsCases.java:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)
at org.testng.TestRunner.run(TestRunner.java:617)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
at org.testng.SuiteRunner.run(SuiteRunner.java:240)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
at org.testng.TestNG.run(TestNG.java:1057)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)

===============================================
Default test
Tests run: 1, Failures: 1, Skips: 0

===============================================
Default suite
Total tests run: 1, Failures: 1, Skips: 0

[TestNG] Time taken by org.testng.reporters.jq.Main@649d209a: 59 ms
[TestNG] Time taken by org.testng.reporters.JUnitReportReporter@7e0babb1: 16 ms
[TestNG] Time taken by org.testng.reporters.XMLReporter@5a01ccaa: 17 ms
[TestNG] Time taken by [FailedReporter passed=0 failed=0 skipped=0]: 13 ms
[TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@2aaf7cc2: 97 ms
[TestNG] Time taken by org.testng.reporters.EmailableReporter2@45c8e616: 15 ms

Just using command which I generated as is wont work … You have to use test record feature of Appuim Studio from you your requirement perspective. Follow the steps what you want you need, stop the recording, so Appium Studio generates the code. Check the code by running in Appium Studio , then export and use it in u r external IDE.

That gives two errors:

Error CS0103: The name 'Duration' does not exist in the current context (CS0103)

and

Error CS1061: 'TouchAction' does not contain a definition for 'waitAction' and no accessible extension method 'waitAction' accepting a first argument of type 'TouchAction' could be found (are you missing a using directive or an assembly reference?) (CS1061) 

Thank you, i got it , it’s working