Hi,
D/w make, model#, approx age??
Volt meter on the fill valve...check for power ( normally 110-120 volt AC ) and when the water quits is the power still there?... NO - timer/control, float, float switch, wiring YES - bad fill valve.
Not always...the fill valve coil can heat up and quit or the fill valve can simply fail mechanically.
jeff. Appliance Repair Aid