JXA Select value from popup menu

I saw in this post that I could select the value from a popup menu like this:

myButton.click();
delay(1);
myButton.menus[0].menuItems.byName(value).click();

However, in my case I get the following error Error -1719: Invalid Index. It happens after the button is clicked, I can see that the menu is opened but it fails to get the menuItems.
Here is my full code

const SystemEvents = Application('System Events');
const app = SystemEvents.processes.byName(appName);


const uiElements = app
  .windows[0]
  .groups[0]
  .groups[0]
  .scrollAreas[0]
  .uiElements[0]
  .groups[5]
  .uiElements;

const value = "One more"

for (const key in uiElements) {
  if (uiElements[key].class() === 'popUpButton') {
    const myButton = uiElements[key]
  	myButton.click();
	delay(2);
	myButton.menus[0].menuItems.byName(value).click();
  }
}

What is the application that you are targeting ?

it's an internal application from my work, unfortunately it's not accessible

Hard to test without seeing the application, but the first thing that comes to mind is that reference by name is case-sensitive, so I wonder whether the menu item is actually "One more" or "One More"

What menu names (if any) are returned, in your context there, by an expression like:

myButton.menus[0].menuItems.name().join("\n")

?

myButton.menus[0].menuItems.name().join("\n")

gives me: Error -1719: Index non valide.
I also tried with

myButton.menus.menuItems.name().join("\n")

which returns undefined

So it doesn't look as if there is, in fact, any menu collection or array associated with that myButton reference.