Legacy AddUserTest passes locally but fails in CI

Hello Devs, I am working on resurrecting a legacy test RATEST-288 and I have made a PR here The test passes locally but fails in CI. I have put here the error logs on CI 1640813034196 geckodriver INFO Listening on mozru - Pastebin.com.

However, what stood out for me in the error log were these lines.

Results :

Tests in error: 
  addUserTest(org.openmrs.contrib.qaframework.legacy.AddUserTest): The element reference of <input name="action" type="submit"> is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed(..)
  addUserTest(org.openmrs.contrib.qaframework.legacy.AddUserTest): Session ID is null. Using WebDriver after calling quit()?(..)

Could someone please look into my error and guide me on what I can do. I am also doing my best to go over the blocker.

Thank you very much cc @kdaud @sharif , @jonathan , @ibacher , @dkayiwa and any other available to look into it.

have put a comment on github.

@irenyak1 how far with this ticket.