1
votes

The first screen of my app is a mandatory language selector which have two AppCompatSpinners with different ids. I can see the clicks from the robo script, but the spinners won’t open, so the next action to click the spinner list item fails… Any idea why?

  • I've tried removing any other events but the click to open the spinner, but it didn't work
  • The script was recorded using Android Studio and a real device.

This is the view hierarchy:

RelativeLayout
--> ImageView
--> LinearLayout
----> ImageView
----> AppCompatSpinner
----> AppCompatSpinner
----> Button

And this is the script

[
  {
    "eventType": "VIEW_CLICKED",
    "timestamp": 1563530585,
    "replacementText": "",
    "actionCode": -1,
    "delayTime": 0,
    "canScrollTo": false,
    "elementDescriptors": [
      {
        "className": "android.support.v7.widget.AppCompatSpinner",
        "recyclerViewChildPosition": -1,
        "adapterViewChildPosition": -1,
        "groupViewChildPosition": 1,
        "resourceId": "<package ommited>:id/country_selector_spinner",
        "contentDescription": "",
        "text": ""
      },
      {
        "className": "android.widget.LinearLayout",
        "recyclerViewChildPosition": -1,
        "adapterViewChildPosition": -1,
        "groupViewChildPosition": 1,
        "resourceId": "",
        "contentDescription": "",
        "text": ""
      },
      {
        "className": "android.widget.RelativeLayout",
        "recyclerViewChildPosition": -1,
        "adapterViewChildPosition": -1,
        "groupViewChildPosition": 0,
        "resourceId": "",
        "contentDescription": "",
        "text": ""
      }
    ]
  }
]
1

1 Answers

0
votes

If my understanding is correct, Robo performs the click on the spinner as intended (and you can even see the click in the resulting video), but the app does not react to this click as intended. This might be an issue of the app behaving differently on a different device and/or API level. Do you see this problem when you run your FTL Robo test on the same physical device and API level you recorded your script on? Also, another check would be to record your actions as an Espresso Test in Android Studio (Run -> Record Espresso Test) and see how this test replays your click on the spinner on the same device and on a different device (e.g., an emulator).