TestProject Forum

Cannot get the textfield in replay test case for Android app written in flutter

I would like to replay a test case for an Android app written in flutter. However, I cannot replay the test case for the step in edit textfield. Attached the screen capture and sample testing app for yours reference. Please advise. Thanks.

Sample Android App APK: https://drive.google.com/file/d/1EP6rKWVOr6Y7efzq7ZIuglBS7P_NAo_J/view?usp=sharing

what kind of error message you are getting in the red bar?

what is you agent version?

Error Message getting in the red bar attached below.
Agent Version: 0.65.11 and 0.65.23
Thanks.

Message

Action failed using following locators:

  1. XPATH=//android.widget.EditText[@text = ‘Test’]
    TimeoutException: Timeout occurred while trying to perform the action. Element state is invalid (obscured by another element or invisible): InvalidElementStateException: Cannot set the element to ‘123456’. Did you interact with the correct element?
    Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
    System info: host: ‘KONEW-0327’, ip: ‘10.0.75.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘13.0.1’
    Driver info: io.appium.java_client.android.AndroidDriver
    Capabilities {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, databaseEnabled: false, desired: {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, deviceName: samsung-sm_n9750-RF8M81QJ96X, fullReset: false, newCommandTimeout: 0, noReset: true, noSign: true, platformName: android, platformVersion: 29, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, systemPort: 53139, udid: RF8M81QJ96X}, deviceApiLevel: 29, deviceManufacturer: samsung, deviceModel: SM-N9750, deviceName: RF8M81QJ96X, deviceScreenDensity: 560, deviceScreenSize: 1440x3040, deviceUDID: RF8M81QJ96X, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 0, noReset: true, noSign: true, pixelRatio: 3.5, platform: LINUX, platformName: ANDROID, platformVersion: 10, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, statBarHeight: 114, systemPort: 53139, takesScreenshot: true, udid: RF8M81QJ96X, viewportRect: {height: 2760, left: 0, top: 114, width: 1440}, warnings: {}, webStorageEnabled: false}
    Session ID: 0afc54c6-5d54-4fa4-bbd2-1234c24aec06

  2. XPATH=//android.widget.EditText
    TimeoutException: Timeout occurred while trying to perform the action. Element state is invalid (obscured by another element or invisible): InvalidElementStateException: Cannot set the element to ‘123456’. Did you interact with the correct element?
    Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
    System info: host: ‘KONEW-0327’, ip: ‘10.0.75.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘13.0.1’
    Driver info: io.appium.java_client.android.AndroidDriver
    Capabilities {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, databaseEnabled: false, desired: {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, deviceName: samsung-sm_n9750-RF8M81QJ96X, fullReset: false, newCommandTimeout: 0, noReset: true, noSign: true, platformName: android, platformVersion: 29, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, systemPort: 53139, udid: RF8M81QJ96X}, deviceApiLevel: 29, deviceManufacturer: samsung, deviceModel: SM-N9750, deviceName: RF8M81QJ96X, deviceScreenDensity: 560, deviceScreenSize: 1440x3040, deviceUDID: RF8M81QJ96X, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 0, noReset: true, noSign: true, pixelRatio: 3.5, platform: LINUX, platformName: ANDROID, platformVersion: 10, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, statBarHeight: 114, systemPort: 53139, takesScreenshot: true, udid: RF8M81QJ96X, viewportRect: {height: 2760, left: 0, top: 114, width: 1440}, warnings: {}, webStorageEnabled: false}
    Session ID: 0afc54c6-5d54-4fa4-bbd2-1234c24aec06

  3. XPATH=//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.widget.FrameLayout[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.view.View[1]/android.widget.EditText[1]
    TimeoutException: Timeout occurred while trying to perform the action. Element state is invalid (obscured by another element or invisible): InvalidElementStateException: Cannot set the element to ‘123456’. Did you interact with the correct element?
    Build info: version: ‘3.141.59’, revision: ‘e82be7d358’, time: ‘2018-11-14T08:17:03’
    System info: host: ‘KONEW-0327’, ip: ‘10.0.75.1’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘13.0.1’
    Driver info: io.appium.java_client.android.AndroidDriver
    Capabilities {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, databaseEnabled: false, desired: {adbPort: 5037, app: C:\Users\brianlam\AppData\R…, appActivity: com.trustme.arnotest.MainAc…, appPackage: com.trustme.arnotest, appWaitForLaunch: false, automationName: UIAutomator2, browserName: , chromeOptions: {w3c: true}, deviceName: samsung-sm_n9750-RF8M81QJ96X, fullReset: false, newCommandTimeout: 0, noReset: true, noSign: true, platformName: android, platformVersion: 29, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, systemPort: 53139, udid: RF8M81QJ96X}, deviceApiLevel: 29, deviceManufacturer: samsung, deviceModel: SM-N9750, deviceName: RF8M81QJ96X, deviceScreenDensity: 560, deviceScreenSize: 1440x3040, deviceUDID: RF8M81QJ96X, fullReset: false, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, newCommandTimeout: 0, noReset: true, noSign: true, pixelRatio: 3.5, platform: LINUX, platformName: ANDROID, platformVersion: 10, skipDeviceInitialization: true, skipServerInstallation: true, skipServerLaunch: true, skipUnlock: true, skipWaitAppStart: true, statBarHeight: 114, systemPort: 53139, takesScreenshot: true, udid: RF8M81QJ96X, viewportRect: {height: 2760, left: 0, top: 114, width: 1440}, warnings: {}, webStorageEnabled: false}
    Session ID: 0afc54c6-5d54-4fa4-bbd2-1234c24aec06

Element

Test<android.widget.EditText>

Found by XPATH://android.widget.EditText[@text = ‘Test’]

Input parameters

(Defined

Used)

keys

123456

123456

We added some extended capabilities for flutter applications in agent version 0.65.30
can you please download the latest version of the agent and try to run it again?

let me know if it helps

I am using agent version - 0.65.42, and it works for recording and playing on my physical device connected to the agent, but when I run it on browserstack it fails with the error that “Cannot set the element to '********” . Did you interact with the correct element?"