Here are your parts
Parts for Whirlpool WED4900XW0 Dryer - AppliancePartsPros.comSee the attachment for the tech sheet.
I am assuming that when you open the door that the motor stops.
Could be a couple things.
Unplug the unit and both wires from the heating element.
Measure across the heating element, should be around 8 to 12 ohms.
Then measure from each side of the eelement to the case, both should be infinite ohms. if not the element is grounded and should be replaced.
If the element is good then you will see that there is a centrifugal switch on the motor which closes when the motor gets close to operating speed.
When the motor is at rest it should be open killing power to the heating coil.
Could be it is stuck in the closed position or it's contacts are welded together.
If it is a bad switch then the motor will have to be replaced.