I've been trying to write Appium tests in Cucumber/Ruby. When I try something like
android.widget.FrameLayout (1)
id: com.android.systemui:id/notification_panel
android.widget.FrameLayout (2)
id: com.android.systemui:id/notification_container_parent
android.widget.FrameLayout (3)
id: com.android.systemui:id/qs_auto_reinflate_container
android.widget.FrameLayout (4)
id: com.android.systemui:id/quick_settings_container
android.widget.RelativeLayout (0)
id: com.android.systemui:id/header
android.widget.LinearLayout (0)
id: com.android.systemui:id/quick_qs_panel
android.widget.Switch (0)
text: On
desc: Wi-Fi,Wifi signal full.,
android.widget.Button (0)
desc: No SIM card,Open Cellular data settings.
android.widget.Button (1)
desc: Battery 100%.,Charging,Open battery details
android.widget.ImageView (2)
id: android:id/icon
android.widget.Switch (1)
text: On
desc: Do not disturb on, alarms only.
android.widget.ImageView (3)
id: android:id/icon
android.widget.Switch (2)
text: Off
desc: Flashlight
android.widget.ImageView (4)
id: android:id/icon
android.widget.Switch (3)
text: Off
desc: Auto-rotate screen,Set to Portrait
android.widget.ImageView (5)
id: android:id/icon
android.widget.LinearLayout (2)
id: com.android.systemui:id/date_time_alarm_group
android.widget.LinearLayout (3)
id: com.android.systemui:id/date_time_group
android.widget.LinearLayout (4)
id: com.android.systemui:id/clock
android.widget.TextView (0)
text: 2:11
desc: 2:11 PM
id: com.android.systemui:id/time_view
android.widget.TextView (1)
text, desc: PM
id: com.android.systemui:id/am_pm_view
android.widget.TextView (2)
text: Wed, May 3
id: com.android.systemui:id/date
android.widget.FrameLayout (7)
id: com.android.systemui:id/settings_button_container
android.widget.ImageView (6)
id: com.android.systemui:id/tuner_icon
android.widget.ImageButton (0)
desc: Open settings.
id: com.android.systemui:id/settings_button
android.widget.ImageView (7)
desc: Open quick settings.
id: com.android.systemui:id/expand_indicator
android.widget.ScrollView (0)
id: com.android.systemui:id/notification_stack_scroller
android.view.View (0)
id: com.android.systemui:id/backgroundNormal
android.widget.FrameLayout (9)
id: com.android.systemui:id/expanded
android.widget.FrameLayout (10)
id: android:id/status_bar_latest_event_content
android.view.ViewGroup (6)
id: android:id/notification_header
android.widget.ImageView (8)
id: android:id/icon
android.widget.TextView (3)
text: Android System
id: android:id/app_name_text
android.widget.LinearLayout (6)
id: android:id/notification_main_column
android.widget.LinearLayout (7)
id: android:id/line1
android.widget.TextView (4)
text: USB debugging connected
id: android:id/title
android.widget.TextView (5)
text: Tap to disable USB debugging.
id: android:id/text
android.widget.FrameLayout (11)
id: com.android.systemui:id/fake_shadow
android.view.View (1)
id: com.android.systemui:id/backgroundNormal
android.widget.FrameLayout (13)
id: com.android.systemui:id/expanded
android.widget.FrameLayout (14)
id: android:id/status_bar_latest_event_content
android.view.ViewGroup (7)
id: android:id/notification_header
android.widget.ImageView (9)
id: android:id/icon
android.widget.TextView (6)
text: Android System
id: android:id/app_name_text
android.widget.LinearLayout (8)
id: android:id/notification_main_column
android.widget.LinearLayout (9)
id: android:id/line1
android.widget.TextView (7)
text: USB charging this device
id: android:id/title
android.widget.TextView (8)
text: Tap for more options.
id: android:id/text
android.widget.FrameLayout (15)
id: com.android.systemui:id/fake_shadow
android.view.View (2)
id: com.android.systemui:id/scrim_behind
android.view.View (3)
id: com.android.systemui:id/scrim_in_front
android.widget.FrameLayout (16)
id: com.android.systemui:id/status_bar
android.widget.LinearLayout (10)
id: com.android.systemui:id/status_bar_contents
android.widget.FrameLayout (17)
id: com.android.systemui:id/notification_icon_area
Which looks like elements from the notification tray, not from my app. If I press the home button, go back to the app, and run page
again, it correctly finds the elements from my app.