Add check for element existence before click in basecontroller.