Refactor WebRobot to make it generic.