Water doesn't enter

A friend is remodeling their kitchen and is giving us their old dishwasher. He warned that he has had problems for about 1 year with the dishwasher filling properly. When he turns the dial to normal cycle, often the pump runs but no water enters the dishwasher. He then stops it and restarts it until it starts to fill properly. He may need to do this 5-10 times before it will begin to fill but usually it will fill on the first or second try. He did say they have hard water and he thought it might be due to deposits. Their ice maker no longer works due to hard water deposits. Based on your website, it sounds like it is either a bad water-inlet valve or float switch. Is this correct? We won’t be able to test it before picking it up from him. Should we replace both just in case?

Thanks,

I would first remove the float cover and check for a jammed float.