Getting error in touch actions in appium 2.5.4 version,java client 9.1.2,selenium 4.19.1

im trying scroll in native app using code sinnpet

` Dimension dimensions = driver.manage().window().getSize();
int screenWidth = dimensions.getWidth();
int screenHeight = dimensions.getHeight();
int startY = (int) (screenHeight * 0.8);
int endY = (int) (screenHeight * 0.2);
TouchAction action = new TouchAction(driver); / 2, startY))
.waitAction(new WaitOptions().withDuration(Duration.ofMillis(500))) // Optional wait
.moveTo(PointOption.point(screenWidth / 2, endY))

===>Getting exception At .perform(); am using appium 2.5.4 version .
The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource
Build info: version: ‘4.20.0’, revision: ‘866c76ca80’
System info: ‘Windows 11’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘22’
Driver info:
Command: [85de2326-ab1a-4218-ba6d-e36ea177d709, performTouchAction {actions=[{action=press, options={x=540, y=1920}}, {action=wait, options={ms=500}}, {action=moveTo, options={x=540, y=480}}, {action=release, options={}}]}]
Capabilities {appium:appActivity:…, appium:appPackage:, appium:automationName: UiAutomator2, appium:databaseEnabled: false, appium:desired: {appActivity:…, appPackage:, automationName: UiAutomator2, deviceName: Emulator, platformName: ANDROID, platformVersion: 14, udid: emulator-5554}, appium:deviceApiLevel: 34, appium:deviceManufacturer: Google, appium:deviceModel: sdk_gphone64_x86_64, appium:deviceName: emulator-5554, appium:deviceScreenDensity: 420, appium:deviceScreenSize: 1080x2400, appium:deviceUDID: emulator-5554, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: true, appium:pixelRatio: 2.625, appium:platformVersion: 14, appium:statBarHeight: 136, appium:takesScreenshot: true, appium:udid: emulator-5554, appium:viewportRect: {height: 2264, left: 0, top: 136, width: 1080}, appium:warnings: {}, appium:webStorageEnabled: false, platformName: ANDROID}
Session ID: 85de2326-ab1a-4218-ba6d-e36ea177d709

=> can please any one guide me , how to resolve this.

1 Like