As previously stated, a solenoid is a electromagnetic switch. It is also the most commonly replaced item in an electrical system. And, they are very seldom bad.
A simple test. Attache a ground wire to the mounting flange then take a hot wire and touch it to the small "S" terminal. if it clicks, the switching part is good. now do the same thing except with an ohm meter connected to the 2 large terminals. when it is siting, it should show open, when you touch the hot wire to the small terminal, you should see 0-2 ohms.
Hope this helps.