appium / appium-flutter-driver

Appium Flutter Driver is a test automation tool for Flutter apps on multiple platforms/OSes. Appium Flutter Driver is part of the Appium mobile test automation tool maintained by community
MIT License
440 stars 179 forks source link

Andriod Automation TouchAction issue #684

Closed Gudibanda-Suresh closed 2 months ago

Gudibanda-Suresh commented 2 months ago

Hello guys, I'm trying to performing TouchActions, => this is my code

        String originalContext = appiumDriver.getContext();
        appiumDriver.context("NATIVE_APP");
        Thread.sleep(1500);
        // Perform TouchAction
        new TouchAction(appiumDriver)
        .press(PointOption.point(673, 1526))
        .release()
        .perform();

=> but I got exception org.openqa.selenium.UnsupportedCommandException: 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: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' and

Failed to initialize Appium session: 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: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'SURESH', ip: '192.168.1.106', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '15' Driver info: io.appium.java_client.AppiumDriver Capabilities {appActivity: com.miui.calculator.cal.Cal..., appPackage: com.miui.calculator, autoGrantPermissions: true, automationName: UiAutomator2, databaseEnabled: false, desired: {appActivity: com.miui.calculator.cal.Cal..., appPackage: com.miui.calculator, autoGrantPermissions: true, automationName: UiAutomator2, deviceName: suresh, newCommandTimeout: 60, platformName: android, platformVersion: 12 SKQ1.211019.001, udid: d27d6eef}, deviceApiLevel: 31, deviceManufacturer: Xiaomi, deviceModel: POCO M2 Pro, deviceName: d27d6eef, deviceScreenDensity: 440, deviceScreenSize: 1080x2400, deviceUDID: d27d6eef, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 60, pixelRatio: 2.75, platform: LINUX, platformName: Android, platformVersion: 12, statBarHeight: 102, takesScreenshot: true, udid: d27d6eef, viewportRect: {height: 2298, left: 0, top: 102, width: 1080}, warnings: {}, webStorageEnabled: false} Session ID: 96241ffe-ae31-4a06-9655-290718105018

=> can you guide me guys, how to resolve this issue.... i need to enable any option in developer options ?

KazuCocoa commented 2 months ago

It was because the class was deprecated and removed from recent UIA2 driver, which is flutter driver uses.

I guess you use Java client, then https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md#touch-actions would help.

Gudibanda-Suresh commented 2 months ago

It was because the class was deprecated and removed from recent UIA2 driver, which is flutter driver uses.

I guess you use Java client, then https://github.com/appium/java-client/blob/master/docs/v7-to-v8-migration-guide.md#touch-actions would help.

thank you this helps me, can you guide me in android automation how to upload a file? in web automation we use robot class right. but in andriod any class is there?

KazuCocoa commented 2 months ago

I'd recommend exploring the java repository's test code, or asking such question in https://discuss.appium.io/ (where is general question forum)