I have a leak when it changes cycles.
You will want to look at the pump to see if you can locate the leak. The leak would most likely be coming from a hose or from the housing where the drain solenoid connects to it which the housing would need to be replaced for that issue.
dishwasher will not drain final water. in rinse only cycle, sometime water will drain. what could cause this problem other than a sensor?
Answer P Morton, A turbidity sensor doesn't normally stop the dishwasher from draining, it will extend the wash cycle, or produce several drain cycles to clear the mucky water. If the dishwasher won't drain, there is the possibility of a restriction in the drain line to the sink plumbing, or a weak motor on the drain pump WD19X10015 assembly.