Unplug the Whirlpool dryer power cord from the electrical outlet.
Pull the lint screen out of its compartment. Remove the two screws next to the lint screen compartment.
Insert a putty knife under the top panel in the front of the dryer. Press the putty knife into the two internal spring clips. Lift the top panel to rest on the wall behind the dryer.
Remove the screws holding the door switch to the Whirlpool LEQ9858PW0 dryer cabinet. Disconnect the electrical connector leading to the door switch.
Remove the old door switch from the dryer cabinet. Install the new switch in its place. Connect the screws that hold the switch to the dryer cabinet. Plug in the electrical connector.
Lower the top panel onto the Whirlpool dryer cabinet. Press down to engage the internal clips. Install the two screws next to the lint screen.