Dishwasher

I have a GE dishwasher. It was triping the breaker when you hit the start button. I reviewed some site and them replaced the water valve and float switch. I hit the start button and the samething it trips the breaker. Before I replaced those parts, I removed the dishwasher to check the electric and all was fine. I believe that is when the float switch went because it no longer trips the breaker. I filled the washer and the washer ran and cleaned the dishes. Please help don’t know what I should do next.