It's so easy to isolate electrical problems that just buying parts and replacing them, in the hope that it might fix a problem, really makes no sense. You need to use a meter or test lamp to trace through the circuit and figure out where you are losing power. It may well be the switch, or it may be somewhere else. You don't know, and we can't say, until you do that.