0

I'm working on testing an android app for the Vuzix Blade AR glasses. Vuzix has a library for apps on their devices called HUD-actionmenu which automatically turns a standard dropdown menu into a horizontally scrolling "action menu". I'm writing tests in Espresso, but I'm running into an issue where my tests can only see views that exist within the action menu. If I look for a view, either by id or by text, or any other attribute, I get an error that that view isn't found within the action's hierarchy. The strange thing is that the hierarchy diagram displayed in the error shows ActionMenuBar as the top layer, and only includes views inside the action menu. None of the other views that appear on the screen are exist within the displayed hierarchy, even though they're visible and working fine when running the actual app.

I didn't develop the app, I'm only responsible for the testing, so I may be overlooking something obvious. I'm relatively new to my role as a test engineer, and I've been learning Kotlin and Android development as a whole from scratch for this project. What I have figured out is that each activity class in this app extends ActionMenuActivity, from the Vuzix library, instead of AppCompatActivity. ActionMenuActivity itself extends DynamicThemeActivity (also a Vuzix component), which in turn extends AppCompatActivity. It seems like something is happening in there that is limiting the visible hierarchy of MainActivity (for example) to just the hierarchy of the action menu, but allowing the rest of the views the function as expected. I'm sure Vuzix Blades aren't the most common platform for app development, but I'm wondering if anyone has encountered something similar or has any ideas how I can get around this issue and run tests against all the views in the app, not just the ones inside the action menu.

Josh Halpern
  • 13
  • 1
  • 3
  • Welcome to Stackoverflow! Please take the time to absorb SO's [recommendations addressed to new users](https://stackoverflow.com/help/how-to-ask). You may take the [tour](https://stackoverflow.com/tour); then do read what's [on-topic here] (https://stackoverflow.com/help/on-topic). In your case, will be very helpful if you share your exact code, or a simple sample. Your explanation is full accurate, but if somebody want to reproduce your issue, will take a long time. – Sourcerer Jan 23 '22 at 08:26
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 23 '22 at 08:27
  • @josh-halpern I am the developer of the Vuzix Action Menu library. I'm sorry I hadn't noticed this question before now. Did you ever find a resolution to this? I have not used Expresso with ActionMenu before. My only guess is that since the action menu is wrapped in a popup menu, that is likely why the rest of the activity hierarchy is not visible. – Greg Moens May 23 '22 at 21:04

0 Answers0