The float is located inside the dishwasher in the tub. As water fills the tub, the water lifts the float. When the float rises to a certain level it triggers the float switch which in turn turns off the water flow. In some dishwashers, the float switch is only used to prevent overfilling and the amount of water is regulated by the timer.
Before testing the float assembly, unplug the dishwasher or shut off the power at the fuse box or breaker panel to avoid an electrical shock hazard.
To inspect the float assembly, open the dishwasher and remove the bottom rack. Remove the float cover (if any; it can be identified by the fact that the cover does not move up and down). The cover may snap in place or it may be fastened in place with a screw.
Lift and drop the float several times. It should move freely. If the float sticks, it may prevent the dishwasher from filling or draining properly. Remove the float and look for obstructions that may interfere with its free movement. The float usually snaps in place. If it does not come off with a small force, it may have to be disconnected from the float switch first.
Replace the float and float cover. If you found no obstructions and the problem persists, test the float switch.