Refactored selenium steps into exception-safe methods.