XWIKI-9949: Add ability to pass a timeout when waiting for an element