ID for (automatically generated) back button?

Is there a way to give the default back button, that is generated by navigating through sites, an HTML id attribute so it can be identified?

If you don’t get any better answers, the only legitimate reason I can think of for trying to do this would be so that it could be interacted with in an automated fashion, such as for testing, and in that case you should be able to grab it with the button.back-button CSS selector.

Exactly, Espresso / UI Automator in this case.

Unfortunately accessing by class gives the correct element, but somehow this can’t be interacted with.

But after thinking about it, of course having IDs would be a problem with the same page in multiple places of the page history, so this was a bad idea in the first place.

My fallback now was to use element selection with XPath. Ugly, but works.