Examined the replacement part to see which side had the snap-in lever. Used a flexible scraper to compress the lever and rotated the switch out. Made sure there was a sufficient length of the wiring harness sticking out so it would not be able to disappear into the cabinet. Fortunately the wiring connector only fits one way and is easy to remove. pressed the wiring connector onto the replacement switch and, having noted the original orientation, snapped it in.
I bought two switches to save on shipping charges three years from now.