There are two wires connected to each solenoid (aka coil) on the water inlet valve. Label the wires and connections so that you can properly reconnect them later. The wires are connected with slip-on connectors. Firmly pull the connectors off of the terminals (do not pull on the wire itself). You may need to use a pair of needle-nose pliers to remove the connectors. Inspect the connectors and the terminals for corrosion. If either is corroded they should be cleaned or replaced.
Use a continuity tester or multitester to test for continuity. Set the multitester to the ohms setting X1. Touch one probe to each terminal. A reading of infinity indicates a bad solenoid that must be replaced. Different brands and models will have various measurements, but the valve should show some resistance if it is functioning properly. Test the second one in the same way as the first.
If the solenoid is working properly, but water leaks through the valve even when the washer is off, then the valve itself is the problem. Debris may be preventing the valve from closing. If the valve cannot be cleaned, it will have to be replaced. The valve can also fail mechanically. So even if it passes the electrical test, it may still require replacement. If you have ruled out all other possibilities, go ahead and replace the valve.