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
468 stars 183 forks source link

Switching context from native to flutter multiple times using appium-flutter-driver in hybrid app #556

Open yagyeshsahu-cred opened 1 year ago

yagyeshsahu-cred commented 1 year ago

How can we handle multiple context switching from native to flutter to native using Appium?

Switching context from native to flutter works seamlessly with appium flutter driver. Switching context back from flutter to native throws below error. We cannot use flutter driver as the app is hybrid and uses only few flutter and web views.

  1. Using appium 2.x
  2. Launching android driver with url 0.0.0.0:4723
  3. Launching appium flutter driver with url 0.0.0.0:4723

Steps - perform actions on native screen. -> Flutter screen loads -> switch to flutter context using driver.context("Flutter"); -> perform actions on flutter screen --> navigate to native screen --> switch to native view throws error

reference issue - https://github.com/appium/appium/discussions/19115

192:~ $ appium --address 0.0.0.0 --port 4723 --allow-cors --relaxed-security --base-path /wd/hub
 Welcome to Appium v2.1.3 (REV b8b46501e4caa1cad75b30627c123127ab09a6a7)
 Non-default server args:
 {
   allowCors: true,
   basePath: '/wd/hub',
   relaxedSecurityEnabled: true
 }
 Attempting to load driver uiautomator2...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-uiautomator2-driver
 Attempting to load driver mac2...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-mac2-driver
 Attempting to load driver espresso...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-espresso-driver
 Attempting to load driver safari...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-safari-driver
 Attempting to load driver gecko...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-geckodriver
 Attempting to load driver flutter...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-flutter-driver
 Attempting to load driver xcuitest...
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-xcuitest-driver
(node:47470) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 exit listeners added to [process]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)
 You have enabled CORS requests from any host. Be careful not to visit sites which could maliciously try to start Appium sessions on your machine
 Appium REST http interface listener started on http://0.0.0.0:4723/wd/hub
 You can provide the following URLs in your client code to connect to this server:
    http://127.0.0.1:4723/wd/hub (only accessible from the same host)
    http://192.168.1.5:4723/wd/hub
 Available drivers:
   - uiautomator2@2.29.5 (automationName 'UiAutomator2')
   - mac2@1.5.3 (automationName 'Mac2')
   - espresso@2.21.1 (automationName 'Espresso')
   - safari@3.3.3 (automationName 'Safari')
   - gecko@1.1.9 (automationName 'Gecko')
   - flutter@1.21.1 (automationName 'Flutter')
   - xcuitest@4.34.1 (automationName 'XCUITest')
 Available plugins:
   - images@2.0.10
   - execute-driver@3.0.12
   - relaxed-caps@1.0.5
   - universal-xml@1.0.8
 No plugins activated. Use the --use-plugins flag with names of plugins to activate
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appPackage":"","disableWindowAnimation":false,"noReset":true,"deviceName":"emulator-5554","appActivity":"com..androidapp.SplashActivity","newCommandTimeout":180,"automationName":"UIAutomator2","autoGrantPermissions":true,"unicodeKeyboard":true,"platformName":"Android","resetKeyboard":true},"capabilities":{"firstMatch":[{"appium:app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appium:appActivity":"com..androidapp.SplashActivity","appium:appPackage":"","appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:deviceName":"emulator-5554","appium:disableWindowAnimation":false,"appium:newCommandTimeout":180,"appium:noReset":true,"platformName":"android","appium:resetKeyboard":true,"appium:unicodeKeyboard":true}]}}
[debug] [AppiumDriver@5299] Calling AppiumDriver.createSession() with args: [{"app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appPackage":"","disableWindowAnimation":false,"noReset":true,"deviceName":"emulator-5554","appActivity":"com..androidapp.SplashActivity","newCommandTimeout":180,"automationName":"UIAutomator2","autoGrantPermissions":true,"unicodeKeyboard":true,"platformName":"Android","resetKeyboard":true},null,{"firstMatch":[{"appium:app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appium:appActivity":"com..androidapp.SplashActivity","appium:appPackage":"","appium:autoGrantPermissions":true,"appium:automationName":"UIAutomator2","appium:deviceName":"emulator-5554","appium:disableWindowAnimation":false,"appium:newCommandTimeout":180,"appium:noReset":true,"platformName":"android","appium:resetKeyboard":true,"appium:unicodeKeyboard":true}]}]
[debug] [AppiumDriver@5299] Event 'newSessionRequested' logged at 1693907791091 (15:26:31 GMT+0530 (India Standard Time))
 Attempting to find matching driver for automationName 'UIAutomator2' and platformName 'android'
 The 'uiautomator2' driver was installed and matched caps.
 Will require it at /opt/homebrew/bin/node_modules/appium-uiautomator2-driver
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-uiautomator2-driver
[AppiumDriver@5299] Appium v2.1.3 creating new AndroidUiautomator2Driver (v2.29.5) session
[AppiumDriver@5299] Checking BaseDriver versions for Appium and AndroidUiautomator2Driver
[AppiumDriver@5299] Appium's BaseDriver version is 9.3.20
[AppiumDriver@5299] AndroidUiautomator2Driver's BaseDriver version is 9.3.20
[AppiumDriver@5299] Applying relaxed security to 'AndroidUiautomator2Driver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [AndroidUiautomator2Driver@5cb2] Creating session with W3C capabilities: {
[debug] [AndroidUiautomator2Driver@5cb2]   "alwaysMatch": {
[debug] [AndroidUiautomator2Driver@5cb2]     "platformName": "android",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:app": "/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:appActivity": "com..androidapp.SplashActivity",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:appPackage": "",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:autoGrantPermissions": true,
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:automationName": "UIAutomator2",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:deviceName": "emulator-5554",
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:disableWindowAnimation": false,
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:newCommandTimeout": 180,
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:noReset": true,
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:resetKeyboard": true,
[debug] [AndroidUiautomator2Driver@5cb2]     "appium:unicodeKeyboard": true
[debug] [AndroidUiautomator2Driver@5cb2]   },
[debug] [AndroidUiautomator2Driver@5cb2]   "firstMatch": [
[debug] [AndroidUiautomator2Driver@5cb2]     {}
[debug] [AndroidUiautomator2Driver@5cb2]   ]
[debug] [AndroidUiautomator2Driver@5cb2] }
[AndroidUiautomator2Driver@5cb2] The following capabilities were provided, but are not recognized by Appium:
[AndroidUiautomator2Driver@5cb2]   deviceName
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Session created with session id: 0a5f1f51-28d6-4fe5-9bde-424193df016a
[BaseDriver] Using local app '/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Checking whether app is actually present
[ADB] Found 3 'build-tools' folders under '/Users//Library/Android/sdk' (newest first):
[ADB]     /Users//Library/Android/sdk/build-tools/34.0.0-rc3
[ADB]     /Users//Library/Android/sdk/build-tools/33.0.1
[ADB]     /Users//Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 31
[ADB] Getting device platform version
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 12
[debug] [ADB] Device API level: 31
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Relaxing hidden api policy
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('5.1.0' >= '5.1.0')
[debug] [ADB] There is no need to install/upgrade '/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes

[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Forwarding UiAutomator2 Server port 6790 to local port 8200
[debug] [ADB] Forwarding system: 8200 to device: 6790
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8200 tcp:6790'
[debug] [ADB] Checking app cert for /opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.3.apk
[debug] [ADB] Checking app cert for /opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[ADB] Using 'apksigner.jar' from '/Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar verify --print-certs /opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar verify --print-certs /opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.3.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] '/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm path io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v5.12.3.apk'
[ADB] '/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.3.apk' is signed with the default certificate
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version name of the installed 'io.appium.uiautomator2.server' is greater or equal to the application version name ('5.12.3' >= '5.12.3')
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Server packages status: [{"wasSigned":true,"installState":"sameVersionInstalled","appPath":"/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.3.apk","appId":"io.appium.uiautomator2.server"},{"wasSigned":true,"installState":"sameVersionInstalled","appPath":"/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk","appId":"io.appium.uiautomator2.server.test"}]
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Server packages are not going to be (re)installed
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waiting up to 30000ms for services to be available
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[debug] [ADB] Getting install status for 
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm path '
[debug] [ADB] '' is installed
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] noReset has been requested and the app is already installed. Doing nothing
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Performing shallow cleanup of automation leftovers
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] The following obsolete sessions are still running: ["db6f47f9-5629-4a7a-bfba-8a1a9335859d"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Cleaning up 1 obsolete session
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Starting UIAutomator2 server 5.12.3
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Using UIAutomator2 server from '/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.3.apk' and test from '/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P","5037","-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] socket hang up
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] socket hang up
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /status] to [GET http://127.0.0.1:8200/status] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] The initialization of the instrumentation process took 2054ms
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/session' to command name 'createSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /session] to [POST http://127.0.0.1:8200/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,...
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2",...
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Determined the downstream protocol as 'W3C'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/appium/device/info] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"androidId":"683e37e52332ccfa","apiVersion":"31","bluetooth":{"state":"ON"},"brand":"google","carrierName":"T-Mobile","displayDensity":440,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_arm64","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":4300,"linkUpstreamBandwidthKbps":1800,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":10,"subtypeName":"HSPA","type":0,"typeNam...
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Starting '/com..androidapp.SplashActivity and waiting for '/com..androidapp.SplashActivity'
[debug] [ADB] Getting IDs of all '' processes
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)com\.\.androidapp\.dev\(\[\[:blank:\]\]\|\$\)'
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] '' is already running and noReset is enabled. Set forceAppLaunch capability to true if the app must be forcefully restarted on session startup.
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/appium/device/pixel_ratio] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":2.75}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/appium/device/system_bars] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"statusBar":83}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/window/current/size] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"height":2148,"width":1080}}
[AppiumDriver@5299] New AndroidUiautomator2Driver session created successfully, session 0a5f1f51-28d6-4fe5-9bde-424193df016a added to master session list
[debug] [AppiumDriver@5299] Event 'newSessionStarted' logged at 1693907798347 (15:26:38 GMT+0530 (India Standard Time))
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Cached the protocol value 'W3C' for the new session 0a5f1f51-28d6-4fe5-9bde-424193df016a
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.createSession() result: {"capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTime...
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts 200 1 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/' to command name 'getSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"lastScrollData":null}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noRese...
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a 200 10 ms - 1398
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts
[HTTP] {"implicit":10000}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] W3C timeout argument: {"implicit":10000}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Set implicit wait to 10000ms
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts 200 0 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/' to command name 'getSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"lastScrollData":null}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noRese...

[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts
[HTTP] {"implicit":10000}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] W3C timeout argument: {"implicit":10000}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Set implicit wait to 10000ms
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts 200 0 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/' to command name 'getSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"lastScrollData":null}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noRese...
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a 200 18 ms - 1398
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts
[HTTP] {"implicit":10000}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,10000,"0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] W3C timeout argument: {"implicit":10000}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Set implicit wait to 10000ms
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/timeouts 200 4 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/' to command name 'getSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"lastScrollData":null}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noRese...
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a 200 8 ms - 1398
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/app/launch
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.launchApp() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [ADB] Getting install status for 
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm path '
[debug] [ADB] '' is installed
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] noReset has been requested and the app is already installed. Doing nothing
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start -W -n /com..androidapp.SplashActivity -S'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.launchApp() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/app/launch 200 2236 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/context
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getCurrentContext() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getCurrentContext() result: "NATIVE_APP"
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/context 200 4 ms - 22
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element
[HTTP] {"using":"id","value":"bureau_consent"}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.findElement() with args: ["id","bureau_consent","0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Valid locator strategies for this request: xpath, id, class name, accessibility id, css selector, -android uiautomator
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waiting up to 10000 ms for condition
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/element' to command name 'findElement'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /element] to [POST http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/element] with body: {"strategy":"id","selector":"bureau_consent","context":"","multiple":false}
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 404: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:63)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:277)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:271)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:77)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.chann...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waited for 5954 ms so far
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/element' to command name 'findElement'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /element] to [POST http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/element] with body: {"strategy":"id","selector":"bureau_consent","context":"","multiple":false}
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 404: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:63)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:277)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:271)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:77)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.chann...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waited for 9363 ms so far
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/element' to command name 'findElement'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /element] to [POST http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/element] with body: {"strategy":"id","selector":"bureau_consent","context":"","multiple":false}
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 404: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"error":"no such element","message":"An element could not be located on the page using the given search parameters","stacktrace":"io.appium.uiautomator2.common.exceptions.ElementNotFoundException: An element could not be located on the page using the given search parameters\n\tat io.appium.uiautomator2.handler.FindElement.safeHandle(FindElement.java:63)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:277)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:271)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:77)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:366)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:352)\n\tat io.netty.chann...
[debug] [W3C] Matched W3C error code 'no such element' to NoSuchElementError
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Encountered internal error running command: NoSuchElementError: An element could not be located on the page using the given search parameters.
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at AndroidUiautomator2Driver.findElOrEls (/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/node_modules/appium-android-driver/lib/commands/find.js:75:11)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at AndroidUiautomator2Driver.findElOrElsWithProcessing (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/commands/find.ts:60:12)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at AndroidUiautomator2Driver.findElement (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/commands/find.ts:75:12)
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element 404 10398 ms - 813
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element
[HTTP] {"using":"xpath","value":"//*[@text='SEND MONEY']"}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='SEND MONEY']","0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Valid locator strategies for this request: xpath, id, class name, accessibility id, css selector, -android uiautomator
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Waiting up to 10000 ms for condition
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/element' to command name 'findElement'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /element] to [POST http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/element] with body: {"strategy":"xpath","selector":"//*[@text='SEND MONEY']","context":"","multiple":false}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"ELEMENT":"00000000-0000-0081-ffff-ffff00000067","element-6066-11e4-a52e-4f735466cecf":"00000000-0000-0081-ffff-ffff00000067"}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"00000000-0000-0081-ffff-ffff00000067","ELEMENT":"00000000-0000-0081-ffff-ffff00000067"}
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element 200 929 ms - 137
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element/00000000-0000-0081-ffff-ffff00000067/click
[HTTP] {"id":"00000000-0000-0081-ffff-ffff00000067"}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.click() with args: ["00000000-0000-0081-ffff-ffff00000067","0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/element/00000000-0000-0081-ffff-ffff00000067/click' to command name 'click'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [POST /element/00000000-0000-0081-ffff-ffff00000067/click] to [POST http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86/element/00000000-0000-0081-ffff-ffff00000067/click] with body: {"element":"00000000-0000-0081-ffff-ffff00000067"}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":null}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.click() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/element/00000000-0000-0081-ffff-ffff00000067/click 200 35 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Matched '/' to command name 'getSession'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Proxying [GET /] to [GET http://127.0.0.1:8200/session/a5c9768a-a1de-455a-a9af-67cafed16e86] with no body
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Got response with status 200: {"sessionId":"a5c9768a-a1de-455a-a9af-67cafed16e86","value":{"lastScrollData":null}}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.getSession() result: {"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noRese...
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a 200 6 ms - 1398
[HTTP] 
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[debug] [AppiumDriver@5299] Calling AppiumDriver.getSessions() with args: []
[debug] [AppiumDriver@5299] Responding to client with driver.getSessions() result: [{"id":"0a5f1f51-28d6-4fe5-9bde-424193df016a","capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","...
[HTTP] <-- GET /wd/hub/sessions 200 1 ms - 1439
[HTTP] 
[HTTP] --> POST /wd/hub/session
[HTTP] {"desiredCapabilities":{"appPackage":"","noReset":true,"appium:automationName":"Flutter","deviceName":"emulator-5554","appium:platformName":"Android"},"capabilities":{"firstMatch":[{"appium:appPackage":"","appium:automationName":"Flutter","appium:platformName":"Android","appium:deviceName":"emulator-5554","appium:noReset":true}]}}
[debug] [AppiumDriver@5299] Calling AppiumDriver.createSession() with args: [{"appPackage":"","noReset":true,"appium:automationName":"Flutter","deviceName":"emulator-5554","appium:platformName":"Android"},null,{"firstMatch":[{"appium:appPackage":"","appium:automationName":"Flutter","appium:platformName":"Android","appium:deviceName":"emulator-5554","appium:noReset":true}]}]
[debug] [AppiumDriver@5299] Event 'newSessionRequested' logged at 1693907835021 (15:27:15 GMT+0530 (India Standard Time))
[BaseDriver] The capabilities ["platformName"] are standard capabilities and do not require "appium:" prefix
 Attempting to find matching driver for automationName 'Flutter' and platformName 'Android'
 The 'flutter' driver was installed and matched caps.
 Will require it at /opt/homebrew/bin/node_modules/appium-flutter-driver
[debug]  Requiring driver at /opt/homebrew/bin/node_modules/appium-flutter-driver
[AppiumDriver@5299] Appium v2.1.3 creating new FlutterDriver (v1.21.1) session
[AppiumDriver@5299] Checking BaseDriver versions for Appium and FlutterDriver
[AppiumDriver@5299] Appium's BaseDriver version is 9.3.20
[AppiumDriver@5299] FlutterDriver's BaseDriver version is 9.3.20
[AppiumDriver@5299] Applying relaxed security to 'FlutterDriver' as per server command line argument. All insecure features will be enabled unless explicitly disabled by --deny-insecure
[debug] [FlutterDriver@dbdc] Creating session with W3C capabilities: {
[debug] [FlutterDriver@dbdc]   "alwaysMatch": {
[debug] [FlutterDriver@dbdc]     "appium:appPackage": "",
[debug] [FlutterDriver@dbdc]     "appium:automationName": "Flutter",
[debug] [FlutterDriver@dbdc]     "platformName": "Android",
[debug] [FlutterDriver@dbdc]     "appium:deviceName": "emulator-5554",
[debug] [FlutterDriver@dbdc]     "appium:noReset": true
[debug] [FlutterDriver@dbdc]   },
[debug] [FlutterDriver@dbdc]   "firstMatch": [
[debug] [FlutterDriver@dbdc]     {}
[debug] [FlutterDriver@dbdc]   ]
[debug] [FlutterDriver@dbdc] }
[FlutterDriver@dbdc] The following capabilities were provided, but are not recognized by Appium:
[FlutterDriver@dbdc]   appPackage
[FlutterDriver@dbdc]   deviceName
[FlutterDriver@dbdc (6e276058)] Session created with session id: 6e276058-36c3-4d34-a3c7-b560a5507d19
[FlutterDriver] Starting an Android proxy session
[debug] [AndroidUiautomator2Driver@5b59] Creating session with W3C capabilities: {
[debug] [AndroidUiautomator2Driver@5b59]   "alwaysMatch": {
[debug] [AndroidUiautomator2Driver@5b59]     "appium:appPackage": "",
[debug] [AndroidUiautomator2Driver@5b59]     "appium:automationName": "Flutter",
[debug] [AndroidUiautomator2Driver@5b59]     "platformName": "Android",
[debug] [AndroidUiautomator2Driver@5b59]     "appium:deviceName": "emulator-5554",
[debug] [AndroidUiautomator2Driver@5b59]     "appium:noReset": true
[debug] [AndroidUiautomator2Driver@5b59]   },
[debug] [AndroidUiautomator2Driver@5b59]   "firstMatch": [
[debug] [AndroidUiautomator2Driver@5b59]     {}
[debug] [AndroidUiautomator2Driver@5b59]   ]
[debug] [AndroidUiautomator2Driver@5b59] }
[AndroidUiautomator2Driver@5b59] The following capabilities were provided, but are not recognized by Appium:
[AndroidUiautomator2Driver@5b59]   deviceName
[AndroidUiautomator2Driver@5b59 (858646cc)] Session created with session id: 858646cc-38c7-41b0-829c-18843fa7b3c5
[AndroidUiautomator2Driver@5b59 (858646cc)] Starting '' directly on the device
[ADB] Found 3 'build-tools' folders under '/Users//Library/Android/sdk' (newest first):
[ADB]     /Users//Library/Android/sdk/build-tools/34.0.0-rc3
[ADB]     /Users//Library/Android/sdk/build-tools/33.0.1
[ADB]     /Users//Library/Android/sdk/build-tools/30.0.3
[ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[AndroidDriver] Retrieving device list
[debug] [ADB] Trying to find a connected android device
[debug] [ADB] Getting connected devices
[debug] [ADB] Connected devices: [{"udid":"emulator-5554","state":"device"}]
[AndroidDriver] Using device: emulator-5554
[ADB] Using 'adb' from '/Users//Library/Android/sdk/platform-tools/adb'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 start-server'
[debug] [ADB] Setting device id to emulator-5554
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.sdk'
[debug] [ADB] Current device property 'ro.build.version.sdk': 31
[ADB] Getting device platform version
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell getprop ro.build.version.release'
[debug] [ADB] Current device property 'ro.build.version.release': 12
[debug] [ADB] Device API level: 31
[AndroidUiautomator2Driver@5b59 (858646cc)] Relaxing hidden api policy
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'settings put global hidden_api_policy_pre_p_apps 1;settings put global hidden_api_policy_p_apps 1;settings put global hidden_api_policy 1''
[AndroidDriver] No app sent in, not parsing package/activity
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 wait-for-device'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell echo ping'
[debug] [AndroidDriver] Pushing settings apk to device...
[debug] [ADB] Getting package info for 'io.appium.settings'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.settings'
[debug] [ADB] The version name of the installed 'io.appium.settings' is greater or equal to the application version name ('5.1.0' >= '5.1.0')
[debug] [ADB] There is no need to install/upgrade '/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/io.appium.settings/apks/settings_apk-debug.apk'
[debug] [ADB] Getting IDs of all 'io.appium.settings' processes
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell 'pgrep --help; echo $?''
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)io\.appium\.settings\(\[\[:blank:\]\]\|\$\)'
[debug] [AndroidDriver] io.appium.settings is already running. There is no need to reset its permissions.
[debug] [Logcat] Starting logs capture with command: /Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 logcat -v threadtime
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Forwarding UiAutomator2 Server port 6790 to local port 8201
[debug] [ADB] Forwarding system: 8201 to device: 6790
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:8201 tcp:6790'
[debug] [ADB] Checking app cert for /opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.2.apk
[debug] [ADB] Checking app cert for /opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[ADB] Using 'apksigner.jar' from '/Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar'
[debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar verify --print-certs /opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk
[debug] [ADB] Starting apksigner: /usr/bin/java -Xmx1024M -Xss1m -jar /Users//Library/Android/sdk/build-tools/34.0.0-rc3/lib/apksigner.jar verify --print-certs /opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.2.apk
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-debug-androidTest.apk'
[ADB] '/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk' is signed with the default certificate
[debug] [ADB] Getting install status for io.appium.uiautomator2.server.test
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm path io.appium.uiautomator2.server.test'
[debug] [ADB] 'io.appium.uiautomator2.server.test' is installed
[debug] [ADB] apksigner stdout: Signer #1 certificate DN: EMAILADDRESS=android@android.com, CN=Android, OU=Android, O=Android, L=Mountain View, ST=California, C=US
[debug] [ADB] Signer #1 certificate SHA-256 digest: a40da80a59d170caa950cf15c18c454d47a39b26989d8b640ecd745ba71bf5dc
[debug] [ADB] Signer #1 certificate SHA-1 digest: 61ed377e85d386a8dfee6b864bd85b0bfaa5af81
[debug] [ADB] Signer #1 certificate MD5 digest: e89b158e4bcf988ebd09eb83f5378e87
[debug] [ADB] 
[debug] [ADB] sha256 hash did match for 'appium-uiautomator2-server-v5.12.2.apk'
[ADB] '/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.2.apk' is signed with the default certificate
[debug] [ADB] Getting package info for 'io.appium.uiautomator2.server'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package io.appium.uiautomator2.server'
[debug] [ADB] The version code of the installed 'io.appium.uiautomator2.server' is greater than the application version code (130 > 129)
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Server packages status: [{"wasSigned":true,"installState":"newerVersionInstalled","appPath":"/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.2.apk","appId":"io.appium.uiautomator2.server"},{"wasSigned":true,"installState":"sameVersionInstalled","appPath":"/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk","appId":"io.appium.uiautomator2.server.test"}]
[AndroidUiautomator2Driver@5b59 (858646cc)] Server packages are not going to be (re)installed
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Waiting up to 30000ms for services to be available
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pm list instrumentation'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Instrumentation target 'io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner' is available
[ADB] Adding packages ["io.appium.settings","io.appium.uiautomator2.server","io.appium.uiautomator2.server.test"] to Doze whitelist
[debug] [ADB] Got the following command chunks to execute: [["dumpsys","deviceidle","whitelist","+io.appium.settings",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server",";","dumpsys","deviceidle","whitelist","+io.appium.uiautomator2.server.test",";"]]
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys deviceidle whitelist +io.appium.settings ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server ; dumpsys deviceidle whitelist +io.appium.uiautomator2.server.test ;'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] No app capability. Assuming it is already on the device
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Performing shallow cleanup of automation leftovers
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] The following obsolete sessions are still running: ["a5c9768a-a1de-455a-a9af-67cafed16e86"]
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Cleaning up 1 obsolete session
[debug] [Instrumentation] .
[debug] [Instrumentation] Time: 42.058
[debug] [Instrumentation] 
[debug] [Instrumentation] OK (1 test)
[debug] [Instrumentation] The process has exited with code 0
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am force-stop io.appium.uiautomator2.server.test'
[AndroidUiautomator2Driver@5b59 (858646cc)] Starting UIAutomator2 server 5.12.2
[AndroidUiautomator2Driver@5b59 (858646cc)] Using UIAutomator2 server from '/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-v5.12.2.apk' and test from '/opt/homebrew/bin/node_modules/appium-flutter-driver/node_modules/appium-uiautomator2-driver/node_modules/appium-uiautomator2-server/apks/appium-uiautomator2-server-debug-androidTest.apk'
[AndroidUiautomator2Driver@5b59 (858646cc)] Waiting up to 30000ms for UiAutomator2 to be online...
[debug] [ADB] Creating ADB subprocess with args: ["-P","5037","-s","emulator-5554","shell","am","instrument","-w","-e","disableAnalytics",true,"io.appium.uiautomator2.server.test/androidx.test.runner.AndroidJUnitRunner"]
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /status] to [GET http://127.0.0.1:8201/status] with no body
[AndroidUiautomator2Driver@5b59 (858646cc)] socket hang up
[debug] [Instrumentation] io.appium.uiautomator2.server.test.AppiumUiAutomator2Server:
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /status] to [GET http://127.0.0.1:8201/status] with no body
[AndroidUiautomator2Driver@5b59 (858646cc)] socket hang up
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/status' to command name 'getStatus'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /status] to [GET http://127.0.0.1:8201/status] with no body
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"None","value":{"message":"UiAutomator2 Server is ready to accept commands","ready":true}}
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] The initialization of the instrumentation process took 2046ms
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/session' to command name 'createSession'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [POST /session] to [POST http://127.0.0.1:8201/session] with body: {"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","appPackage":"","automationName":"Flutter","deviceName":"emulator-5554","noReset":true},"platformName":"Android","appPackage":"","automationName":"Flutter","deviceName":"emulator-5554","noReset":true,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}}}
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5","value":{"capabilities":{"firstMatch":[{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"Android","appPackage":"","automationName":"Flutter","deviceName":"emulator-5554","noReset":true},"platformName":"Android","appPackage":"","automationName":"Flutter","deviceName":"emulator-5554","noReset":true,"deviceUDID":"emulator-5554"}],"alwaysMatch":{}},"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5"}}
[AndroidUiautomator2Driver@5b59 (858646cc)] Determined the downstream protocol as 'W3C'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /appium/device/info] to [GET http://127.0.0.1:8201/session/774b781a-2dab-4142-88a1-d90b85fa21f5/appium/device/info] with no body
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5","value":{"androidId":"683e37e52332ccfa","apiVersion":"31","bluetooth":{"state":"ON"},"brand":"google","carrierName":"T-Mobile","displayDensity":440,"locale":"en_US","manufacturer":"Google","model":"sdk_gphone64_arm64","networks":[{"capabilities":{"SSID":null,"linkDownBandwidthKbps":4300,"linkUpstreamBandwidthKbps":1800,"networkCapabilities":"NET_CAPABILITY_MMS,NET_CAPABILITY_SUPL,NET_CAPABILITY_DUN,NET_CAPABILITY_FOTA,NET_CAPABILITY_IMS,NET_CAPABILITY_CBS,NET_CAPABILITY_INTERNET,NET_CAPABILITY_NOT_RESTRICTED,NET_CAPABILITY_TRUSTED,NET_CAPABILITY_NOT_VPN,NET_CAPABILITY_VALIDATED,NET_CAPABILITY_NOT_ROAMING,NET_CAPABILITY_FOREGROUND,NET_CAPABILITY_NOT_CONGESTED,NET_CAPABILITY_NOT_SUSPENDED","signalStrength":-2147483648,"transportTypes":"TRANSPORT_CELLULAR"},"detailedState":"CONNECTED","extraInfo":"epc.tmobile.com","isAvailable":true,"isConnected":true,"isFailover":false,"isRoaming":false,"state":"CONNECTED","subtype":10,"subtypeName":"HSPA","type":0,"typeNam...
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys window'
[AndroidDriver] Screen already unlocked, doing nothing
[AndroidUiautomator2Driver@5b59 (858646cc)] Starting '/undefined and waiting for '/undefined'
[debug] [ADB] Getting IDs of all '' processes
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)com\.\.androidapp\.dev\(\[\[:blank:\]\]\|\$\)'
[AndroidUiautomator2Driver@5b59 (858646cc)] '' is already running and noReset is enabled. Set forceAppLaunch capability to true if the app must be forcefully restarted on session startup.
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /appium/device/pixel_ratio] to [GET http://127.0.0.1:8201/session/774b781a-2dab-4142-88a1-d90b85fa21f5/appium/device/pixel_ratio] with no body
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5","value":2.75}
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/appium/device/system_bars' to command name 'getSystemBars'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /appium/device/system_bars] to [GET http://127.0.0.1:8201/session/774b781a-2dab-4142-88a1-d90b85fa21f5/appium/device/system_bars] with no body
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5","value":{"statusBar":83}}
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Matched '/window/current/size' to command name 'getWindowSize'
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Proxying [GET /window/current/size] to [GET http://127.0.0.1:8201/session/774b781a-2dab-4142-88a1-d90b85fa21f5/window/current/size] with no body
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Got response with status 200: {"sessionId":"774b781a-2dab-4142-88a1-d90b85fa21f5","value":{"height":2148,"width":1080}}
[debug] [FlutterDriver] Establishing a connection to the Dart Observatory. Will retry 10 times with 3000ms delay between retries. These values could be customized by changing 'maxRetryCount' and 'retryBackoffTime' capabilities.
[FlutterDriver] Attempt #1 of 10
[debug] [ADB] Forwarding system: 39549 to device: 39549
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:39549 tcp:39549'
[FlutterDriver] Connecting to Dart Observatory: ws://127.0.0.1:39549/cCE_eNF_H98=/ws
[FlutterDriver] Listing all isolates: [{"type":"@Isolate","id":"isolates/647416385119923","name":"main","number":"647416385119923","isSystemIsolate":false}]
[AppiumDriver@5299] New FlutterDriver session created successfully, session 6e276058-36c3-4d34-a3c7-b560a5507d19 added to master session list
[debug] [AppiumDriver@5299] Event 'newSessionStarted' logged at 1693907841851 (15:27:21 GMT+0530 (India Standard Time))
[debug] [FlutterDriver@dbdc (6e276058)] Cached the protocol value 'W3C' for the new session 6e276058-36c3-4d34-a3c7-b560a5507d19
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.createSession() result: {"capabilities":{"subcommand":"server","address":"0.0.0.0","allowCors":true,"basePath":"/wd/hub","port":4723,"relaxedSecurityEnabled":true,"extraArgs":[],"allowInsecure":[],"callbackPort":4723,"debugLogSpacing":false,"denyInsecure":[],"keepAliveTimeout":600,"localTimezone":false,"loglevel":"debug","logNoColors":false,"logTimestamp":false,"longStacktrace":false,"noPermsCheck":false,"sessionOverride":false,"strictCaps":false,"useDrivers":[],"usePlugins":[],"driver":{"xcuitest":{"wdaLocalPort":8100}},"tmpDir":"/var/folders/25/1kkm532n36b8_0qs2yx4_6tm0000gp/T","platformName":"Android","appPackage":"","automationName":"Flutter","deviceName":"emulator-5554","noReset":true,"fullReset":false,"fastReset":false,"skipUninstall":true}}
[HTTP] <-- POST /wd/hub/session 200 6832 ms - 822
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/timeouts
[HTTP] {"implicit":20000}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.timeouts() with args: [null,null,null,null,20000,"6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'timeouts'
[debug] [FlutterDriver@dbdc (6e276058)] W3C timeout argument: {"implicit":20000}}
[debug] [FlutterDriver@dbdc (6e276058)] Set implicit wait to 20000ms
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.timeouts() result: null
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/timeouts 200 1 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/contexts
[HTTP] {}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.getContexts() with args: ["6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'getContexts'
[debug] [AndroidDriver] Getting a list of available webviews
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cat /proc/net/unix'
[debug] [AndroidDriver] Parsed 1 active devtools socket: ["@webview_devtools_remote_12024"]
[debug] [AndroidDriver] Collecting CDP data of 1 webview
[debug] [AndroidDriver] Forwarding remote port webview_devtools_remote_12024 to a local port in range 10900..11000
[debug] [AndroidDriver] You could use the 'webviewDevtoolsPort' capability to customize the starting port number
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward tcp:10900 localabstract:webview_devtools_remote_12024'
[debug] [ADB] Removing forwarded port socket connection: 10900 
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 forward --remove tcp:10900'
[debug] [AndroidDriver] CDP data collection completed
[debug] [AndroidDriver] WEBVIEW_12024 mapped to pid 12024
[debug] [AndroidDriver] Getting process name for webview 'WEBVIEW_12024'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ps --help'
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell ps -A'
[debug] [AndroidDriver] Got process name: ''
[AndroidDriver] Skipping the webview 'WEBVIEW_12024' at '@webview_devtools_remote_12024' since it has reported having zero pages
[debug] [AndroidDriver] Found 0 webviews: []
[debug] [AndroidUiautomator2Driver@5b59 (858646cc)] Available contexts: ["NATIVE_APP"]
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.getContexts() result: ["NATIVE_APP","FLUTTER"]
[HTTP] <-- GET /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/contexts 200 373 ms - 34
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/context
[HTTP] {"name":"FLUTTER"}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.setContext() with args: ["FLUTTER","6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'setContext'
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.setContext() result: null
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/context 200 1 ms - 14
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/execute/sync
[HTTP] {"script":"flutter:setFrameSync","args":[false]}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.execute() with args: ["flutter:setFrameSync",[false],"6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'execute'
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.execute() result: {"isError":false,"response":{},"type":"_extensionType","method":"ext.flutter.driver"}
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/execute/sync 200 16 ms - 95
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/execute/sync
[HTTP] {"script":"flutter:waitFor","args":[{"ELEMENT":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9","element-6066-11e4-a52e-4f735466cecf":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9"},1000]}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.execute() with args: ["flutter:waitFor",[{"ELEMENT":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9","element-6066-11e4-a52e-4f735466cecf":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9"},1000],"6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'execute'
[debug] [FlutterDriver] >>> {"command":"waitFor","keyValueType":"String","keyValueString":"SEARCH_BAR","finderType":"ByValueKey","timeout":1000}
[debug] [FlutterDriver] <<< {"isError":false,"response":{},"type":"_extensionType","method":"ext.flutter.driver"} | previous command waitFor
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.execute() result: {"element-6066-11e4-a52e-4f735466cecf":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9","ELEMENT":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9"}
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/execute/sync 200 13 ms - 281
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9/click
[HTTP] {"id":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9"}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.click() with args: ["eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9","6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'click'
[debug] [FlutterDriver] >>> {"command":"tap","keyValueType":"String","keyValueString":"SEARCH_BAR","finderType":"ByValueKey"}
[debug] [FlutterDriver] <<< {"isError":false,"response":{},"type":"_extensionType","method":"ext.flutter.driver"} | previous command tap
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.click() result: {}
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9CQVIiLCJmaW5kZXJUeXBlIjoiQnlWYWx1ZUtleSJ9/click 200 69 ms - 12
[HTTP] 
[HTTP] --> POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9JTlBVVCIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0%3D/value
[HTTP] {"id":"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9JTlBVVCIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0=","text":"8872615631@paytm","value":["8","8","7","2","6","1","5","6","3","1","@","p","a","y","t","m"]}
[debug] [FlutterDriver@dbdc (6e276058)] Calling AppiumDriver.setValue() with args: [["8","8","7","2","6","1","5","6","3","1","@","p","a","y","t","m"],"eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9JTlBVVCIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0=","6e276058-36c3-4d34-a3c7-b560a5507d19"]
[debug] [FlutterDriver] Executing Flutter driver command 'setValue'
[debug] [FlutterDriver] >>> {"command":"tap","keyValueType":"String","keyValueString":"SEARCH_INPUT","finderType":"ByValueKey"}
[debug] [FlutterDriver] <<< {"isError":false,"response":{},"type":"_extensionType","method":"ext.flutter.driver"} | previous command tap
[debug] [FlutterDriver@dbdc (6e276058)] Responding to client with driver.setValue() result: null
[HTTP] <-- POST /wd/hub/session/6e276058-36c3-4d34-a3c7-b560a5507d19/element/eyJrZXlWYWx1ZVR5cGUiOiJTdHJpbmciLCJrZXlWYWx1ZVN0cmluZyI6IlNFQVJDSF9JTlBVVCIsImZpbmRlclR5cGUiOiJCeVZhbHVlS2V5In0%3D/value 200 340 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/sessions
[HTTP] {}
[debug] [AppiumDriver@5299] Calling AppiumDriver.getSessions() with args: []
[debug] [AppiumDriver@5299] Responding to client with driver.getSessions() result: [{"id":"0a5f1f51-28d6-4fe5-9bde-424193df016a","capabilities":{"platform":"LINUX","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","disableWindowAnimation":false,"newCommandTimeout":180,"noReset":true,"resetKeyboard":true,"unicodeKeyboard":true},"platformName":"android","app":"/Users//Desktop/SDET/frontend-automation-/src/test/resources/app/Flutterdebug.apk","appActivity":"com..androidapp.SplashActivity","appPackage":"","autoGrantPermissions":true,"automationName":"UIAutomator2","deviceName":"emulator-5554","...
[HTTP] <-- GET /wd/hub/sessions 200 4 ms - 1642
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/device/activate_app
[HTTP] {"bundleId":""}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.activateApp() with args: ["",null,null,null,"0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Activating ''
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell cmd package resolve-activity --brief '
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] The launchable activity name of '' was resolved to 'android/com.android.internal.app.ResolverActivity'. Switching the resolver to not use cmd
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell dumpsys package '
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell am start-activity -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000 -n /com..androidapp.SplashActivity'
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=/com..androidapp.SplashActivity }
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.activateApp() result: null
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/device/activate_app 200 548 ms - 14
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'GET /' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at UIA2Proxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at AndroidUiautomator2Driver.getSession (/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/lib/driver.js:269:20)
[HTTP] <-- GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a 500 16 ms - 943
[HTTP] 
[HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/screenshot
[HTTP] {}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getScreenshot() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'GET /screenshot' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at UIA2Proxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:355:13)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at processTicksAndRejections (node:internal/process/task_queues:95:5)
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)]     at AndroidUiautomator2Driver.commands.getScreenshot (/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/lib/commands/screenshot.js:18:10)
[HTTP] 
[HTTP] --> POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/device/terminate_app
[HTTP] {"bundleId":""}
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.terminateApp() with args: ["",null,null,null,"0a5f1f51-28d6-4fe5-9bde-424193df016a"]
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Terminating ''
[debug] [ADB] Getting IDs of all '' processes
[debug] [ADB] Running '/Users//Library/Android/sdk/platform-tools/adb -P 5037 -s emulator-5554 shell pgrep -f \(\[\[:blank:\]\]\|\^\)com\.\.\.qa\(\[\[:blank:\]\]\|\$\)'
[AndroidUiautomator2Driver@5cb2 (0a5f1f51)] The app '' is not running
[debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Responding to client with driver.terminateApp() result: false
[HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/device/terminate_app 200 63 ms - 15
[HTTP] 
[FlutterDriver] Connection to ws://127.0.0.1:39549/cCE_eNF_H98=/ws closed
[Logcat] Logcat terminated with code 0, signal null
[Logcat] Logcat terminated with code 0, signal null
[debug] [Instrumentation] The process has exited with code 0
KazuCocoa commented 1 year ago

So, the issue was that you started UIAutomator2 and then flutter automation name without deleting the session, correct? It looks like the behavior was expected since the first uia2 session was not correctly stopped. The flutter driver uses UIA2 driver to manage the device/android app as the readme. The 2nd flutter driver session did not start the uia2 session used in the flutter driver properly.

Maybe you need to launch the flutter automation name without app nor appPackage, then need to start the app from mobile:startAppActivity etc in the NATIVE_APP context. Then need to attach to the observatory url in the expected timing with flutter:connectObservatoryWsUrl. https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#several-ways-to-start-an-application has some ideas to establish the flutter

yagyeshsahu-cred commented 1 year ago

Correct. Started UIAutomator2 and then flutter automation name without deleting the session.

Requirement is to switch between native and flutter contexts while navigating from native to flutter screen and back to native in the same session, without relaunching app. We will lose the screen we want to perform further actions.

Ours is a hybrid app with first activity load on native screen. So, we cannot start app with appium flutter driver because attaching observatory url fails.

Execution starts with native android driver with automation name uia2. switched Context to flutter and performed actions. Further switching context to native fails..

Started UIAutomator2 -> perform actions in native screen -> initialised flutter driver with automation name "Flutter" without deleting the session. -> switch context to native fails with below error [HTTP] <-- POST /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a/appium/device/activate_app 200 548 ms - 14 [HTTP] [HTTP] --> GET /wd/hub/session/0a5f1f51-28d6-4fe5-9bde-424193df016a [HTTP] {} [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Calling AppiumDriver.getSession() with args: ["0a5f1f51-28d6-4fe5-9bde-424193df016a"] [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Getting session details from server to mix in [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] Encountered internal error running command: UnknownError: An unknown server-side error occurred while processing the command. Original error: 'GET /' cannot be proxied to UiAutomator2 server because the instrumentation process is not running (probably crashed). Check the server log and/or the logcat output for more details [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] at UIA2Proxy.command (/opt/homebrew/lib/node_modules/appium/node_modules/@appium/base-driver/lib/jsonwp-proxy/proxy.js:355:13) [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] at processTicksAndRejections (node:internal/process/task_queues:95:5) [debug] [AndroidUiautomator2Driver@5cb2 (0a5f1f51)] at AndroidUiautomator2Driver.getSession (/opt/homebrew/bin/node_modules/appium-uiautomator2-driver/lib/driver.js:269:20)

Scenario - switch between 3 pages to automate feature without relaunching app in between. Page 1 - native Page 2 - Flutter Page 3 - Native

KazuCocoa commented 1 year ago

Did you try out below suggestion way in my previous comment?

Maybe you need to launch the flutter automation name without app nor appPackage, then need to start the app from mobile:startAppActivity etc in the NATIVE_APP context. Then need to attach to the observatory url in the expected timing with flutter:connectObservatoryWsUrl. https://github.com/appium/appium-flutter-driver?tab=readme-ov-file#several-ways-to-start-an-application has some ideas to establish the flutter

So, the flow would be:

  1. start a session with automationName: flutter without app nor appPackage
  2. Change the context to NATIVE_APP
  3. do native app stuff
  4. switch the context with flutter and call flutter:connectObservatoryWsUrl
  5. do the flutter context stuff
yagyeshsahu-cred commented 1 year ago

Thank you. Yes, With app already installed, these steps worked.

Is there a way where we do not have to launch the app using startActivityApp at test case level. Is there a way to launch/install app using capabilities with above mentioned steps. Currently initialising driver at base test level and passing driver to test class.

Also, we also have web views in app. is there a way to use 2 drivers automation name uiA2 & flutter performing actions on same client without changing app state during context switching. May be in thread safe manner.

image
KazuCocoa commented 1 year ago

launch/install app using capabilities with above mentioned steps

In which set[? For now, my last comment had two launching app cases as below

A. launching an app without checking the observatory URL, B. launching an app with checking the observatory URL and attaching to it

As Appium's design, it expects to be used with 1) launching one app in a new session creation, or 2) starting a session without launching any apps and launching multiple apps etc as test setup before proceeding test steps like my previous comment. So putting the above A and B into one new session request is not for the design's usage.

You may be able to build appium's plugin by yourself to handle such a thing I guess. https://appium.io/docs/en/2.0/ecosystem/build-plugins/

KazuCocoa commented 1 year ago

use 2 drivers automation name uiA2 & flutter performing actions on same client without changing app state during context switching

Not possible with vanilla drivers since the flutter driver also uses uia2 driver internally to handle the app. A device can have one app process that has the same package name. So if you prepare customized uia2 driver by yourself, potentially it would be possible, but it requires your own customization in the driver (appium uiautomator2 server) level