5v1988 / appium-flutter-client

Appium Flutter Client
MIT License
3 stars 2 forks source link

can't use a gesture LongPress in Flutter App #4

Open Nowshin23 opened 9 months ago

Nowshin23 commented 9 months ago

hi, I am trying to automate a Flutter Mobile app with Appium. In the application there is a transaction flow where i need to press and hold a button to execute the transaction. I tried to use touchAction function, it didn't work. I also use W3c protocol to perform the gesture but it didn't work as well. I am trying to find the solution for 2days but got no luck. Could you please help?

I am attaching a Screenshot of my Code snippet.

image --- This is the method

image --- This is where i call the method

Stackrace:

org.openqa.selenium.UnsupportedCommandException: {"value":{"error":"unknown method","message":"Method has not yet been implemented","stacktrace":"NotYetImplementedError: Method has not yet been implemented\n at FlutterDriver.executeCommand (C:\Users\BS603\node_modules\@appium\base-driver\lib\basedriver\driver.ts:100:13)\n at processTicksAndRejections (node:internal/process/task_queues:95:5)\n at FlutterDriver.executeCommand (C:\Users\BS603\node_modules\appium-flutter-driver\lib\driver.ts:215:16)\n at defaultBehavior (C:\Users\BS603\AppData\Roaming\npm\node_modules\appium\lib\appium.js:1109:14)\n at AppiumDriver.executeWrappedCommand (C:\Users\BS603\AppData\Roaming\npm\node_modules\appium\lib\appium.js:1215:16)\n at AppiumDriver.executeCommand (C:\Users\BS603\AppData\Roaming\npm\node_modules\appium\lib\appium.js:1121:17)\n at asyncHandler (C:\Users\BS603\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:393:19)"}} Command duration or timeout: 51 milliseconds Build info: version: '4.18.1', revision: 'b1d3319b48' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '20.0.1' Driver info: io.qualityplus.flutter.driver.AppiumFlutterDriver Command: [045fcbfb-667b-4b47-bad6-229cc35b74a4, getElementRect {id=eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6ImNvbmZpcm1PcmRlckJ1dHRvbiIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0=}] Capabilities {appium:address: 0.0.0.0, appium:allowCors: false, appium:allowInsecure: [], appium:app: C:\Users\BS603\IdeaProjects..., appium:autoGrantPermissions: true, appium:automationName: Flutter, appium:basePath: , appium:callbackPort: 4723, appium:debugLogSpacing: false, appium:denyInsecure: [], appium:deviceName: emulator-5554, appium:driversImportChunkSize: 3, appium:extraArgs: [], appium:fastReset: true, appium:keepAliveTimeout: 600, appium:localTimezone: false, appium:logNoColors: false, appium:logTimestamp: false, appium:loglevel: debug, appium:longStacktrace: false, appium:noPermsCheck: false, appium:pluginsImportChunkSize: 7, appium:port: 5510, appium:relaxedSecurityEnabled: false, appium:sessionOverride: false, appium:skipUninstall: true, appium:skipUnlock: true, appium:strictCaps: false, appium:subcommand: server, appium:tmpDir: C:\Users\BS603\AppData\Loca..., appium:useDrivers: [], appium:usePlugins: [], platformName: ANDROID} Element: [io.qualityplus.flutter.driver.FlutterElement@d29bc9f1 -> unknown locator] Session ID: 045fcbfb-667b-4b47-bad6-229cc35b74a4

at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:484)
at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:221)
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:170)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:572)
at org.openqa.selenium.remote.RemoteWebElement.execute(RemoteWebElement.java:223)
at org.openqa.selenium.remote.RemoteWebElement.getLocation(RemoteWebElement.java:297)
at org.mobilerefueling.utils.LongPress.longPress(LongPress.java:16)
at org.mobilerefueling.pages.FuelingFlowPage.startFuelingFlow(FuelingFlowPage.java:60)
at org.mobilerefueling.testcases.FuelingFlowTest.fuelingFlow(FuelingFlowTest.java:13)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:134)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:597)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:173)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:816)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:146)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:766)
at org.testng.TestRunner.run(TestRunner.java:587)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:384)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:378)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:337)
at org.testng.SuiteRunner.run(SuiteRunner.java:286)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1109)
at org.testng.TestNG.runSuites(TestNG.java:1039)
at org.testng.TestNG.run(TestNG.java:1007)
at com.intellij.rt.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:66)
at com.intellij.rt.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:105)