Random failures in the issue report were transient UI automation races:
* wait for the source textarea to be visible before typing
* verify the language panel really switched and re-open it when a click is ignored
* retry once on a fresh page for transient selector/timeout errors
* fail fast with LANGUAGE_SWITCH_FAILED / TRANSLATION_RESULT_UNAVAILABLE