I have added the retries on stale elements and changed the page object in some cases to make it robust against elements being added/removed at the same time. For the suggested change of the production code to avoid changing the HTML elements I've opened XWIKI-24648 and a corresponding PR. After applying the changes for this issue, the flickering seems to have stopped: As of now, the last failure was 5.2 days ago (before the fix) with 78 clean runs since then. I'm therefore closing this. If this should fail again, I think a new issue should be opened as it is likely that the new failure reason is not the same as what was discussed and fixed for this issue.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.