take selenium as param, and ensure instanceof