washer fills/ wont drain or spin

washer fills but wont drain or spin , could it be the timer?

Often it is the lid switch